Dsa
Math
Medium
Find the Largest and Its Frequency
Given a list of integers, your task is to find the largest integer and the number of times it appears in the list.
Input format:
- The first line contains an integer N, the number of integers in the list.
- The second line contains N space-separated integers.
Output format:
- Two integers: the largest integer and its frequency in the list, separated by a space.
Example:
Input:
5
1 3 3 2 5
Output:
5 1
Key concepts
mathstatisticsarray manipulation
Practise this out loud — free
Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.
🎙 Practise this question now