Skip to content

Latest commit

 

History

History
 
 

number-frequency

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Number Frequency

Finding the Most Frequently Occurring Number

Given an array of numbers, find the most recurrent number.

For example, given [1, 2, 3, 4, 3], your algorithm should return 3, as it has the highest level of recurrence. For ties, return the first found more recurrent number.

Getting Started

The file you will be editing is most-recurrent.js.

The most-recurrent-test.js file includes a test suite to run your code against.

Run node most-recurrent-test.js to run the test suite in full. As you write code to pass tests, make sure you unskip succeeding tests by changing test.skip to just test.