
Making A Large Island Graph DSU Java Solution
You 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
Search for a command to run...

You 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

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 accou

Given 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

All 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 t

In 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

In this article we will solve the all string permutation problem with javascript by backtracking method. We will generate the solution tree and write the code accordingly, Solution Tree Code class

In this article we will know how to use queues and pubsubs in javascript. A message queue is a communication method used in software systems where one program (the producer) sends messages to a queue,

To solve the power set using recursion problem we have to first make the recursion tree on the decission basis. Recursion Tree In every step we are selecting a character and taking decession adding

Given an array of integers arr, find the sum of min(b), where b ranges over every (contiguous) subarray of arr. Since the answer may be large, return the answer modulo 10<sup>9</sup> + 7. Problem Statement Given an array: arr = [3, 1, 2, 4] We want:...