## Question 1 What is the output if the following head of the linked list and value of $k$ are given as input? head → 8 → 0 → 6 → 1 → 0 → 7 → 8 → 7 → 5 → 3 → 5 → 2 → 4 → 9 → NULL k = 3 ### Options 1. head → 1 → 0 → 7 → 8 → 0 → 6 → 3 → 5 → 2 → 8 → 7 → 5 → 4 → 9 → NULL Incorrect ---------------------------- 2. head → 7 → 0 → 1 → 6 → 0 → 8 → 2 → 5 → 3 → 5 → 7 → 8 → 4 → 9 → NULL Incorrect ---------------------------- 3. head → 6 → 0 → 8 → 7 → 0 → 1 → 5 → 7 → 8 → 2 → 5 → 3 → 4 → 9 → NULL Correct Each group of three nodes should be reversed in place. ---------------------------- 4. head → 8 → 0 → 0 → 1 → 6 → 7 → 8 → 7 → 5 → 3 → 5 → 9 → 4 → 2 → NULL Incorrect ---------------------------- --------------------------------------------- ## Question 2 What is the output if the following head of the linked list and value of k are given as input? head → 6 → 6 → 7 → 7 → 8 → 8 → 9 → 9 → 0 → 0 → NULL k = 5 ### Options 1. head → 8 → 9 → 9 → 0 → 0 → 6 → 6 → 7 → 7 → 8 → NULL Incorrect ---------------------------- 2. head → 8 → 7 → 7 → 6 → 6 → 0 → 0 → 9 → 9 → 8 → NULL Correct Each group of five nodes should be reversed in place. ---------------------------- 3. head → 8 → 7 → 7 → 6 → 6 → 8 → 9 → 9 → 0 → 0 → NULL Incorrect ---------------------------- 4. head → 0 → 0 → 9 → 9 → 8 → 8 → 7 → 7 → 6 → 6 → NULL Incorrect ---------------------------- --------------------------------------------- ## Question 3 What is the output if the following head of the linked list and value of k are given as input? head → 3 → 4 → 7 → 1 → 3 → 0 → 6 → 7 → 2 → 5 → 7 → 8 → 9 → 0 → 6 → 3 → 7 → 1 → 4 → 7 → 8 → 0 → NULL k = 4 ### Options 1. head → 3 → 0 → 6 → 7 → 3 → 4 → 7 → 1 → 9 → 0 → 6 → 3 → 2 → 5 → 7 → 8 → 7 → 1 → 4 → 7 → 8 → 0 → NULL Incorrect ---------------------------- 2. head → 7 → 6 → 0 → 3 → 1 → 7 → 4 → 3 → 3 → 6 → 0 → 9 → 8 → 7 → 5 → 2 → 7 → 4 → 1 → 7 → 8 → 0 → NULL Incorrect ---------------------------- 3. head → 3 → 4 → 0 → 3 → 1 → 7 → 5 → 2 → 7 → 6 → 0 → 9 → 8 → 7 → 1 → 7 → 3 → 6 → 0 → 8 → 4 → 7 → NULL Incorrect ---------------------------- 4. head → 1 → 7 → 4 → 3 → 7 → 6 → 0 → 3 → 8 → 7 → 5 → 2 → 3 → 6 → 0 → 9 → 7 → 4 → 1 → 7 → 8 → 0 → NULL Correct Each group of four nodes should be reversed in place. ---------------------------- --------------------------------------------- ## Question 4 What is the output if the following head of the linked list and value of k are given as input? head → 6 → 7 → 2 → 0 → 9 → 1 → 3 → 6 → 5 → 4 → 8 → NULL k = 2 ### Options 1. head → 2 → 0 → 6 → 7 → 3 → 6 → 9 → 1 → 5 → 4 → 8 → NULL Incorrect ---------------------------- 2. head → 0 → 2 → 7 → 6 → 6 → 3 → 1 → 9 → 4 → 5 → 8 → NULL Incorrect ---------------------------- 3. head → 6 → 2 → 7 → 9 → 0 → 3 → 1 → 5 → 6 → 8 → 4 → NULL Incorrect ---------------------------- 4. head → 7 → 6 → 0 → 2 → 1 → 9 → 6 → 3 → 4 → 5 → 8 → NULL Correct Each group of two nodes should be reversed in place. ---------------------------- ---------------------------------------------