## Question 1 What is the output if the following array is given as input? nums = [1, 2, 2, 2, 1, 2, 1, 2, 3, 4, 1, 2, 1, 2, 2] ### Options 1. 1 Incorrect ---------------------------- 2. 2 Correct Since 2 occurs more than $⌊n / 2⌋$ times in the array, it is the majority element. ---------------------------- 3. 3 Incorrect ---------------------------- 4. 4 Incorrect ---------------------------- --------------------------------------------- ## Question 2 What is the output if the following array is given as input? nums = [4, 3, 4, 4, 4, 3, 4, 3, 5, 5, 4, 4, 1, 4] ### Options 1. 3 Incorrect ---------------------------- 2. 4 Correct Since 4 occurs more than $⌊n / 2⌋$ times in the array, it is the majority element. ---------------------------- 3. 5 Incorrect ---------------------------- 4. 1 Incorrect ---------------------------- ---------------------------------------------