Menu
Coddy logo textTech

Max Occurance

Lesson 19 of 20 in Coddy's Beginner Challenges - Practice Basic Concepts course.

challenge icon

Challenge

Medium

Write a function named occurMax that gets an array of integers and returns the integer that occurs the most!

  • If there is more than one maximum occurrence, return the first one.

Try it yourself

int occurMax(int* a, int n) {
    // Write code here
}

All lessons in Beginner Challenges - Practice Basic Concepts