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 355 problems

Implement the targetSumWaysCount method that counts expressions that reach a target by assigning plus or minus signs. Solved

Implement the maximumProductSubarray method that returns the largest product of any continuous subarray. 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

Implement the matrixBlockSumCenter method that returns the block sum around the center using distance k. Solved

Implement the countSquareSubmatricesOnes method that counts square submatrices that contain only 1 values. Solved

Implement the wordSearchMatrixExists method that checks whether the word exists in the matrix path. Solved

Implement the maximalSquareMatrixArea method that returns the area of the largest square containing only 1 values. Solved