## Direction at last square block

Given a R x C (1 <= R, C <= 1000000000) grid and initial position as top left corner and direction as east. Now we… Read More »

- Minimum time required to rot all oranges | Dynamic Programming
- Rat in a Maze Problem when movement in all possible directions is allowed
- Count number of ways to reach a given score in a Matrix
- Count number of ways to reach destination in a maze
- Maximum sum path in a matrix from top to bottom and back
- Minimum steps required to reach the end of a matrix | Set 2
- Number of shortest paths to reach every cell from bottom-left cell in the grid
- Find minimum steps required to reach the end of a matrix | Set - 1
- Find the sum of the diagonal elements of the given N X N spiral matrix
- Find the number of paths of length K in a directed graph
- Find minimum steps required to reach the end of a matrix | Set 2
- Count number of ways to reach destination in a Maze using BFS
- Print a given matrix in spiral form using direction tracking method
- Find maximum path sum in a 2D matrix when exactly two left moves are allowed
- Find row with maximum and minimum number of zeroes in given Matrix
- Find the position of the given row in a 2-D array
- Find a sub matrix with maximum XOR
- Check if the robot is within the bounds of the grid after given moves
- Number of ways to reach the end of matrix with non-zero AND value
- Check if a cycle of length 3 exists or not in a graph that satisfy a given condition
- Maze With N doors and 1 Key
- Find the original matrix when largest element in a row and a column are given
- Find a way to fill matrix with 1's and 0's in blank positions
- Element in a matrix starting from which anti-clockwise traversal ends at the last element
- Queries to find the last non-repeating character in the sub-string of a given string
- Find the number of p-sided squares in a grid with K blacks painted
- Find if a binary matrix exists with given row and column sums
- Find the number of cells in the table contains X
- Paths from entry to exit in matrix and maximum path sum
- C++ program to Convert a Matrix to Sparse Matrix

Given a R x C (1 <= R, C <= 1000000000) grid and initial position as top left corner and direction as east. Now we… Read More »

Given a matrix that is filled with ‘O’, ‘G’, and ‘W’ where ‘O’ represents open space, ‘G’ represents guards and ‘W’ represents walls in a… Read More »

Given a path in the form of a rectangular matrix having few landmines arbitrarily placed (marked as 0), calculate length of the shortest safe route… Read More »

Given a 2D Matrix of order n X m , print K’th element in spiral form of matrix. See the following examples. Examples: Input: mat[][]… Read More »

Around 150 students appeared for the test. Round 1 (75 minutes): Online coding round hosted on HackerRank . Three coding questions were asked. Given a… Read More »

Intuit was the first company to visit our campus. They selected 6 students. Online Round ———————— Only people with CGPA of 9+ were allowed to… Read More »

Given an M x N matrix, with a few hurdles arbitrarily placed, calculate the length of longest possible route possible from source to destination within… Read More »

Given a square matrix, find if it’s a Toeplitz matrix or not. A Toeplitz (or diagonal-constant) matrix is a matrix in which each descending diagonal… Read More »

Given a N X N binary matrix, find the size of the largest ‘+’ formed by all 1s. Example: For above matrix, largest ‘+’ would… Read More »

Given a N x N binary matrix (elements in matrix can be either 1 or 0) where each row and column of the matrix is… Read More »

Given a screen containing alphabets from A-Z, we can go from one character to another characters using a remote. The remote contains left, right, top… Read More »

Given a grid of numbers, find maximum length Snake sequence and print it. If multiple snake sequences exists with the maximum length, print any one… Read More »

Given a rectangular matrix, we can move from current cell in 4 directions with equal probability. The 4 directions are right, left, top or bottom.… Read More »

Given a number n, print a n x n spiral matrix (of numbers from 1 to n x n) in clockwise direction using O(1) space.… Read More »

We have a square matrix whose size is continuously expanding by a factor of 2. Given a sequence present in the matrix at position (i,… Read More »