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 reverseBitsSimple method that returns the integer formed after reversing the bits. Solved

Implement the countBitsUpToNSum method that returns the total count of set bits for all numbers from 0 to n. Solved

Intermediate

Implement the singleNumberTwoValuesCount method that counts the two values that appear once when others appear twice. Solved

Implement the singleNumberUsingXor method that returns the number that appears once using XOR logic. Solved

Intermediate

Implement the maximumUnitsTruck method that returns the maximum units that can be loaded onto the truck. Solved

Intermediate

Implement the reconstructQueueCount method that returns the number of people after reconstructing the queue. Solved

Intermediate

Implement the partitionLabelsNumber method that returns how many partitions can be made so each character appears in one part. Solved

Implement the assignCookiesMaximumChildren method that returns the maximum number of children that can receive a suitable cookie. Solved

Intermediate

Implement the minimumArrowsBalloons method that returns the minimum arrows needed to burst all balloons. Solved

Intermediate

Implement the eraseOverlapIntervalsCount method that returns how many intervals must be removed to avoid overlaps. Solved

Proficient

Implement the candyDistributionMinimum method that returns the minimum candies needed while respecting rating rules. Solved

Intermediate

Implement the gasStationCircuitStart method that returns the gas station index from which the full circuit can be completed. Solved

Intermediate

Implement the jumpGameMinimumJumpsGreedy method that returns the minimum number of jumps needed to reach the end. Solved

Implement the jumpGameReachableGreedy method that checks whether the last index is reachable using greedy logic. Solved