Adobe India Hackathon - Mock Test 5

Select your answers. Once selected, you cannot change them.

Section 1: MCQs

Section 2: DSA Problem

Majority Element

Given an array of integers, return the element that appears more than n/2 times. If no such element exists, return -1.

Example: Input: [3,3,4,2,4,4,2,4,4] → Output: 4

Write your solution below: