SSSk Shoyebinskshoyebjavascript.hashnode.dev·Jul 4 · 3 min readMaking A Large Island Graph DSU Java SolutionYou are given an n x n binary matrix grid. You are allowed to change at most one 0 to be 1. Return the size of the largest island in grid after applying this operation. An island is a 4-directionally 00
SSSk Shoyebinskshoyebjavascript.hashnode.dev·Jul 4 · 3 min readAccount Merge Graph DSU Solution - JAVA Given a list of accounts where each element accounts[i] is a list of strings, where the first element accounts[i][0] is a name, and the rest of the elements are emails representing emails of the accou00
SSSk Shoyebinskshoyebjavascript.hashnode.dev·Mar 18 · 2 min readShortest Common Supersequence DP JavaScript Code With ExplainationGiven two strings str1 and str2, return the shortest string that has both str1 and str2 as subsequences. If there are multiple valid strings, return any of them. A string s is a subsequence of string 00
SSSk Shoyebinskshoyebjavascript.hashnode.dev·Mar 17 · 2 min readPrint All LCS Sequence JS DP + Backtracking SolutionAll LCS sequence is a hard problem in dynamic programming. In this article we will solve this with dymanic programming approach with backtracking and memoization in javascript. First we need to make t00
SSSk Shoyebinskshoyebjavascript.hashnode.dev·Feb 26 · 3 min readRat In A Maze Problem SolvedJavaScript BacktrackingIn this article we will solve Rat in a maze problem with backtracking. The rat start point is (0,0) and exit point is (n-1, n-1). The rat can move to 1 and 0 is blocked. Diagram Code class Solution 00