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 maximumProfitMultipleTransactions method that returns the maximum stock profit using multiple valid transactions. Solved

Implement the maximumProfitSingleTransaction method that returns the best stock profit using at most one buy and one sell. Solved

Implement the canReachLastIndex method that checks whether the last index can be reached from the first index. Solved

Implement the maximumProductCutting method that finds the maximum product obtainable by cutting an integer into parts. Solved

Implement the rodCuttingMaximumProfit method that finds the maximum profit obtainable by cutting a rod into pieces. Solved

Implement the minimumInsertionsToPalindrome method that finds the minimum insertions required to make the text a palindrome. Solved

Implement the longestPalindromicSubsequenceLength method that returns the length of the longest palindromic subsequence. Solved

Implement the canPartitionEqualSum method that checks whether the array can be split into two subsets with equal sum. Solved