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 stoneGameOptimalDifference method that returns the best score difference when both players pick stones optimally. Solved

Implement the minimumCostCutStick method that returns the minimum total cost to cut a stick at given positions. Solved

Implement the distinctSubsequenceCount method that counts how many subsequences of a source string equal a target string. Solved

Implement the interleavingStringCheck method that checks whether one string is formed by interleaving two other strings. Solved

Implement the minimumFlipsMonotoneBinary method that returns the minimum flips needed to make a binary string monotone increasing. Solved

Implement the burstBalloonsMaxCoins method that returns the maximum coins obtainable by bursting balloons in the best order. Solved

Implement the maxProfitWithCooldown method that returns the maximum stock profit with a one-day cooldown after selling. Solved

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