Karteikarten
Create a minimal BST from array
Karten in diesem Stapel (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
Informationen
- Beschreibung
- Trees Karteikarten am Create a minimal BST from array, erstellt von Pravin Sonawane am 18/06/2018.
- Erstellt von
- Pravin Sonawane
- Aufrufe
- 8
- Tags
- Bewertung