Code Challenges

Get better at coding with practice problems.

Coding Challenges

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

Showing 11 of 11 problems

Implement the lruCacheGetOutputSum method that simulates an LRU cache and returns the sum of get results. Solved

Implement the minimumMeetingRoomsHeap method that returns the minimum number of meeting rooms required for all intervals. Solved

Implement the smallestRangeFromListsWidth method that returns the width of the smallest range covering all sorted lists. Solved

Implement the reorganizeStringPossible method that checks whether the string can be rearranged so adjacent characters differ. Solved

Implement the lastStoneWeightHeap method that returns the final stone weight after repeatedly smashing the two heaviest stones. Solved

Implement the kClosestPointsCount method that counts points included among the k closest points to the origin. Solved

Implement the minimumCostConnectRopes method that returns the minimum total cost needed to connect all ropes. Solved

Implement the findMedianFromDataStreamFloor method that returns the floor of the median from a stream of values. Solved

Implement the mergeKSortedArraysLength method that returns the total length after merging k sorted arrays. Solved

Implement the topKFrequentElementsCount method that counts how many elements are included in the top k frequent values. Solved

Implement the kthLargestElementHeap method that returns the kth largest value using heap logic. Solved