Flashcards
Create a minimal BST from array
Flashcards do conjunto (3)
- 1Boundary conditionif(start >= end) return null;
left = create(values, start, middle);
right = create(values, middle+1, end); - 2Key algorithm stepMiddle is root. Recursive on left half and right half.
- 3Pre conditionsArray should be sorted
Informações
- Descrição
- Trees FlashCards sobre Create a minimal BST from array, criado por Pravin Sonawane em 18-06-2018.
- Criado por
- Pravin Sonawane
- Visualizações
- 8
- Tags
- Avaliação