Ankesh Krishna PrasadinGateway To ThoughtsApproaches To Problem Solving #21 (Multiset | Array)Problem : Given a list of lists of integers, return the smallest difference that can be made by choosing exactly one integer from each of…5 min read·Sep 20, 2021----
Ankesh Krishna PrasadinGateway To ThoughtsApproaches 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…4 min read·Jun 7, 2021----
Ankesh Krishna PrasadinGateway To ThoughtsApproaches To Problem Solving #19 (BFS | Tree)Problem : Given a binary tree root, return the top view of the tree, sorted left to right.3 min read·May 10, 2021----
Ankesh Krishna PrasadinGateway To ThoughtsApproaches 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…3 min read·Apr 19, 2021----
Ankesh Krishna PrasadinGateway To ThoughtsApproaches 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…4 min read·Apr 5, 2021----
Ankesh Krishna PrasadinGateway To ThoughtsApproaches 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…4 min read·Mar 28, 2021----
Ankesh Krishna PrasadinGateway To ThoughtsApproaches 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…4 min read·Mar 18, 2021----
Ankesh Krishna PrasadinGateway To ThoughtsApproaches 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…5 min read·Mar 9, 2021----
Ankesh Krishna PrasadinGateway To ThoughtsApproaches To Problem Solving : Applying Dynamic Programming on 2-D MatricesProblem : Given a two-dimensional matrix of integers containing 1s and 0s, return the total number of square submatrices with all 1s.4 min read·Mar 1, 2021----
Ankesh Krishna PrasadinGateway To ThoughtsApproaches 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…4 min read·Feb 21, 2021----