3 3 votes closed as a duplicate of: GATE CSE 2023 | Question: 2 Which one of the following sequences when stored in an array at locations A[1],...,A[10] forms a max-heap? $23\; 17\; 10\; 6\; 13\; 14\; 1\; 5 \;9 \;12$ $23 \;14 \;19 \;1 \;10 \;13 \;16 \;12 \;7 \;5$ $23 \;17\; 14\; 6\; 13\; 10\; 1\; 5\; 7\; 15$ $23 \;17\; 14\; 7\; 13\; 10\; 1\; 5\; 6\; 12$ Data Structures memorybased-gatecse2023 goclasses data-structures binary-heap + – GO Classes 8.9k views comment Share Follow Print 0 reply Please log in or register to add a comment.
1 1 vote Option (A) is wrong here because node $14$ is comes after $10$. Option (B) is wrong because $16$ comes after node $1$. Option (C) is wrong because $7$ is come after node $6$ Option (D) is a correct representation of the max heap which is as follows: Option (D) is correct. Ref: some max heap insertion question from pyq: GATE CSE 2014 Set 2 GATE CSE 2015 Set 3 GATE CSE 1996 GATE CSE 2005 Hira Thakur answered Feb 6, 2023 Hira Thakur comment Share Follow 0 reply Please log in or register to add a comment.