heap helper function get the position of the left child of the current node >>> get_child_left_position(0) 1
(position: int)
| 28 | |
| 29 | |
| 30 | def get_child_left_position(position: int) -> int: |
| 31 | """ |
| 32 | heap helper function get the position of the left child of the current node |
| 33 | |
| 34 | >>> get_child_left_position(0) |
| 35 | 1 |
| 36 | """ |
| 37 | return (2 * position) + 1 |
| 38 | |
| 39 | |
| 40 | def get_child_right_position(position: int) -> int: |