Problem statement: Given an m*n “board” of characters and a list of strings “words”, return all the words present on

Continue reading## Must do Pattern Problems before starting DSA

This article contains all the important pattern problems that you must solve before starting DSA. This is a part of

Continue reading## Flood Fill Algorithm – Graphs

Problem Statement: An image is represented by a 2-D array of integers, each integer representing the pixel value of the

Continue reading## Number of Provinces

Problem Statement: Given an undirected graph with V vertices. We say two vertices u and v belong to a single

Continue reading## Number of Islands

Problem Statement: Given a grid of size NxM (N is the number of rows and M is the number of

Continue reading## Python RegEx

Problem Statement: To understand Python RegEx. RegEx stands for Regular Expression. The Regex or Regular Expression is a way to define

Continue reading## Depth First Search (DFS)

Problem Statement: Given an undirected graph, return a vector of all nodes by traversing the graph using depth-first search (DFS).

Continue reading## Breadth First Search (BFS): Level Order Traversal

Problem Statement: Given an undirected graph, return a vector of all nodes by traversing the graph using breadth-first search (BFS).

Continue reading## Connected Components in Graphs

So far we’ve seen different types of graphs. Graphs can be connected or can be like a binary tree (as

Continue reading## Passing 2D arrays as arguments in CPP

Ways to pass a 2D array to a function are as follows:- When both dimensions are available globally. Code: Output:

Continue reading