Created
January 8, 2018 02:36
-
-
Save nerohoop/f01e8b3e74705eed1b2c6d65c92feb63 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The root element will be at Arr[0]. | |
Below table shows indexes of other nodes for the ith node, i.e., Arr[i]: | |
Arr[i/2] Returns the parent node | |
Arr[(2*i)+1] Returns the left child node | |
Arr[(2*i)+2] Returns the right child node |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment