945 Snakes And Ladders
Snakes and Ladders You are given an n x n integer matrix board where the cells are labeled from 1 to n2 in a Boustrophedon style starting from the bottom left of the board (i.e. board[n - 1][0]) ...
Snakes and Ladders You are given an n x n integer matrix board where the cells are labeled from 1 to n2 in a Boustrophedon style starting from the bottom left of the board (i.e. board[n - 1][0]) ...
Find Closest Node to Given Two Nodes You are given a directed graph of n nodes numbered from 0 to n - 1, where each node has at most one outgoing edge. The graph is represented with a given 0-in...
Maximize the Number of Target Nodes After Connecting Trees II There exist two **undirected **trees with n and m nodes, labeled from [0, n - 1] and [0, m - 1], respectively. You are given two 2D ...
Maximize the Number of Target Nodes After Connecting Trees I There exist two undirected **trees with n and m nodes, with **distinct labels in ranges [0, n - 1] and [0, m - 1], respectively. You ...
Divisible and Non-divisible Sums Difference You are given positive integers n and m. Define two integers as follows: num1: The sum of all integers in the range [1, n] (both **inclusive**) that ...
Longest Palindrome by Concatenating Two Letter Words You are given an array of strings words. Each element of words consists of two lowercase English letters. Create the longest possible palindr...
Zero Array Transformation III You are given an integer array nums of length n and a 2D array queries where queries[i] = [li, ri]. Each queries[i] represents the following action on nums: Decrem...
Set Matrix Zeroes Given an m x n integer matrix matrix, if an element is 0, set its entire row and column to 0’s. You must do it in place. Example 1: **Input:** matrix = [[1,1,1],[1,0,1],...
Zero Array Transformation I You are given an integer array nums of length n and a 2D array queries, where queries[i] = [li, ri]. For each queries[i]: Select a subset of indices within the range...
Type of Triangle You are given a 0-indexed integer array nums of size 3 which can form the sides of a triangle. A triangle is called **equilateral** if it has all sides of equal length. A triang...