Skip to content

Latest commit

 

History

History
10 lines (6 loc) · 450 Bytes

Picking Numbers.md

File metadata and controls

10 lines (6 loc) · 450 Bytes

Question

  • You are given an array of n integers where 2 <= n <= 100
  • Find the maximum number of integers you can select from the array where the absolute difference between any 2 of the numbers is less than or equal to 1.
  • Example, for [1, 1, 2, 2, 4, 4, 5, 5, 5], the selected numbers would be [4, 4, 5, 5, 5], so our solution is 5.

HackerRank Full Question

Picking Numbers