Question d’entretien chez Meta

How to space-efficiently store a binary tree in an array, and then how to extract the binary tree from its array representation.

Réponse à la question d'entretien

Utilisateur anonyme

9 nov. 2017

Given a string of brackets, write a function to balance the brackets in the string by removing the fewest possible brackets (e.g. the string "(()(())" can be balanced by removing the first character)