Apr 9 · 6 min read · Hello coders, Let's solve a problem today, don't worry about the pattern or solution just bring a book and a pen or open a whiteboard to illustrate. Problem for the day: Alex an adventurous traveller,
Join discussion
Apr 9 · 1 min read · Easy — Dynamic Programming | Array The Problem Find the minimum cost to reach the top of a staircase where you can climb either 1 or 2 steps at a time, and each step has an associated cost. You can start from either step 0 or step 1. Approach Use dyn...
Join discussionApr 9 · 1 min read · Medium — Array | Dynamic Programming | Divide and Conquer The Problem Find the contiguous subarray within a one-dimensional array of numbers that has the largest sum and return that sum. Approach This solution uses Kadane's algorithm, a dynamic progr...
Join discussionApr 9 · 2 min read · Medium — Dynamic Programming | Array | Kadane's Algorithm The Problem Find the contiguous subarray within an array of integers that has the largest product and return that product. Approach Use dynamic programming to track both maximum and minimum pr...
Join discussionApr 9 · 1 min read · Medium — Dynamic Programming | Array | Binary Search The Problem Find the length of the longest strictly increasing subsequence in an array of integers. A subsequence maintains the relative order of elements but doesn't need to be contiguous. Approac...
Join discussionApr 9 · 2 min read · Hard — Dynamic Programming | Depth-First Search | Matrix | Memoization The Problem Find the length of the longest increasing path in a matrix where you can move in four directions (up, down, left, right) to adjacent cells with strictly increasing val...
Join discussionApr 9 · 2 min read · Medium — Dynamic Programming | String | Two Pointers The Problem Find the length of the longest common subsequence (LCS) between two strings, where a subsequence maintains the relative order of characters but doesn't need to be contiguous. Approach U...
Join discussionApr 9 · 1 min read · Medium — Array | Greedy | Dynamic Programming The Problem Given an array of non-negative integers where each element represents the maximum jump length from that position, determine if you can reach the last index starting from the first index. Appro...
Join discussionApr 9 · 1 min read · Medium — Greedy | Array | Dynamic Programming The Problem Find the minimum number of jumps needed to reach the last index of an array, where each element represents the maximum jump length from that position. Approach Use a greedy algorithm that trac...
Join discussion