arrays
arrays
Simple Array Sum – Return the sum of all integers in the array.
Migratory Birds – Find the bird type seen most often; prefer the smallest ID on a tie.
Birthday Cake Candles – Count how many candles are the tallest.
Divisible Sum Pairs – Count pairs whose sum is divisible by a given number k.
Mini-Max Sum – Print the min and max sum of n-1 integers from a list.
Counting Valleys – Count valleys traversed based on up/down steps from sea level.
Equalize the Array – Find the minimum deletions required to make all elements equal.
Minimum Distances – Find minimum distance between equal elements in the array.
Beautiful Triplets – Count triplets where each element is separated by a fixed difference.
Service Lane – For a given range, find the minimum width in the service lane.
Lonely Integer – Return the unique element that doesn’t have a duplicate.
Jumping on the Clouds – Find minimum jumps to reach the last cloud avoiding thunderclouds.
Mark and Toys – Buy maximum toys without exceeding the budget.
Closest Numbers – Find all pairs with the smallest absolute difference.
Climbing the Leaderboard – Assign ranks to player scores using dense ranking.
Max Min – Find minimum difference between any k elements in a sorted array.
Gaming Array – Determine the winner by simulating the removal of largest elements.