How many structurally unique binary search trees(BSTs) are possible that store 'n' distinct values? This algorithm uses dynamic programming memoization approach to solve this problem. Here is a video that explains the algorithm with examples and animation.
Find the longest monotonically increasing subsequence in an array. Java solution for finding length of longest increasing subsequence in an array is provided in code snippet section. Java visualization is provided in algorithm visualization section.
Using dynamic programming find longest palindromic subsequence for a string S. Here is a video solution that finds the longest palindromic subsequence. The algorithm is explained with the help of examples and animations.Java code is provided in Code Snippet Section.
Use dynamic programming and find the longest common subsequence between strings S1 and S2. Here is a video solution that implements solution for the longest common subsequence problem. The algorithm is explained with the help of examples and animations.Java code is provided in Code Snippet Section.
Given a gold mine of n*m dimensions. Each field in this mine contains an integer which is the amount of gold in tons. Initially the miner is in first column but can be at any row i. He can move only (right , right up , right down ) that is from a given cell, the miner can move to the cell diagonally up towards the right or right or diagonally down towards the right. Find out maximum amount of gold he can collect. Java code is given in code snippet section.