Code Challenges

Get better at coding with practice problems.

Coding Challenges

Select a problem, write code, run test cases, and submit your solution.

Showing 19 of 53 problems

Implement the containsDuplicateWithinK method that checks whether duplicate values appear within distance k. Solved

Intermediate

Implement the subarraySumEqualsKCount method that counts subarrays whose sum equals k. Solved

Intermediate

Implement the longestConsecutiveSequenceLength method that returns the length of the longest consecutive number sequence. Solved

Implement the twoSumUsingMap method that returns two indices that form the target sum using a hash map. Solved

Implement the mergeOverlappingIntervalsCount method that returns how many intervals remain after merging all overlaps. Solved