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

Implement the shipPackagesWithinDaysCapacity method that returns the minimum ship capacity needed to deliver packages within given days. Solved

Implement the smallestDivisorUnderThreshold method that finds the smallest divisor satisfying a threshold condition. Solved

Implement the kthMissingPositiveNumber method that returns the kth missing positive integer from a sorted array. Solved

Implement the searchRotatedSortedArrayImportant method that searches for a target in a rotated sorted array using binary search. Solved

Implement the searchRangeOfTarget method that returns the first and last position of a target in a sorted array. Solved

Intermediate

Implement the findRotationCount method that returns how many times a sorted array has been rotated. Solved

Intermediate

Implement the searchInRotatedSortedArray method that searches for a target inside a rotated sorted array. Solved

Intermediate

Implement the findFirstGreaterThanTarget method that returns the first value greater than the target in a sorted array. Solved

Implement the findInsertPosition method that returns the index where the target should be inserted in sorted order. Solved