Flashcards
Create a minimal BST from array
Cards in this deck (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
Information
- Description
- Trees Flashcards on Create a minimal BST from array, created by Pravin Sonawane on 18/06/2018.
- Created by
- Pravin Sonawane
- Views
- 8
- Tags
- Rating