Nov2017 cs Q19

  • Option : C
  • Explanation :
    Binary heaps can be represented using arrays: storing elements in an array and using their relative positions within the array to represent child-parent relationships.
    For the binary heap element stored at index i of the array,
    Parent Node will be at index: floor(i/2)
    Left Child will be at index: 2i
    Right child will be at index: 2*i + 1
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *