Homepage
Open in app
Sign in
Get started
Gateway To Thoughts
Knowlege Expands, When Shared!
Follow
Approaches To Problem Solving #20 (DP | String | Palindrome)
Approaches To Problem Solving #20 (DP | String | Palindrome)
Problem : Given two strings S and T. Consider taking a non-empty subsequence from S, a non-empty subsequence from T, and then…
Ankesh Krishna Prasad
Jun 7
Approaches To Problem Solving #19 (BFS | Tree)
Approaches To Problem Solving #19 (BFS | Tree)
Problem : Given a binary tree root, return the top view of the tree, sorted left to right.
Ankesh Krishna Prasad
May 10
Approaches To Problem Solving #18 (BFS | 2-D Matrix)
Approaches To Problem Solving #18 (BFS | 2-D Matrix)
Problem: Given a 2-D list of integers containing 1s and 0s. Return a 2-D matrix representing the Manhattan distance of the current cell…
Ankesh Krishna Prasad
Apr 19
Approaches To Problem Solving #17(Tree | DFS)
Approaches To Problem Solving #17(Tree | DFS)
Problem: Given a binary tree, return the longest path that alternates, going down from one child to the other child. For example, it may…
Ankesh Krishna Prasad
Apr 5
Approaches To Problem Solving #16(DP| Subsequences)
Approaches To Problem Solving #16(DP| Subsequences)
Problem: Given the strings ‘A’ and ‘B’ consisting of lowercase alphabet characters, return the number of subsequences of ‘A’ that are…
Ankesh Krishna Prasad
Mar 28
Approaches To Problem Solving #15(Graph | SCC)
Approaches To Problem Solving #15(Graph | SCC)
Problem : You are given N cities represented as integers and a list of one-way roads that connects one city to another. Return whether you…
Ankesh Krishna Prasad
Mar 18
Approaches To Problem Solving #14(Divide and Conquer | DP | Array)
Approaches To Problem Solving #14(Divide and Conquer | DP | Array)
Problem: Given a list of integers, arr. Consider a tree where arr represents the values of its leaves in an inorder traversal. All…
Ankesh Krishna Prasad
Mar 9
Approaches To Problem Solving : Applying Dynamic Programming on 2-D Matrices
Approaches To Problem Solving : Applying Dynamic Programming on 2-D Matrices
Problem : Given a two-dimensional matrix of integers containing 1s and 0s, return the total number of square submatrices with all 1s.
Ankesh Krishna Prasad
Feb 28
Approaches To Problem Solving #12(String | DP)
Approaches To Problem Solving #12(String | DP)
Problem : Given two strings A and B, find the minimum edit distance between the two strings. Edit distance is defined using: (a) Deleting…
Ankesh Krishna Prasad
Feb 21
Approaches To Problem Solving #11(Tree | Dynamic Programming)
Approaches To Problem Solving #11(Tree | Dynamic Programming)
In our previous blog, we already started with the introduction to one of the problems that we are going to discuss. We will try to discuss…
Ankesh Krishna Prasad
Feb 14
About Gateway To Thoughts
Latest Stories
Archive
About Medium
Terms
Privacy