## Number of Islands in a 2d grid

Problem Recently, I’ve solved this “Number of Islands” problem on LeetCode, the solution was accepted by the LeetCode OJ. Problem […]

## Run time complexity of printing a binary tree level by level

Problem I have some doubts about running time of following question. The problem is printing a binary tree level by […]

## Finding shortest path in matrix

Problem Given an N x N matrix of positive integers, I need to find the shortest path from the first […]

## Breadth First Search implementation in Python 3 to find path between two given nodes

Problem This is my Breadth First Search implementation in Python 3 that assumes cycles and finds and prints path from […]

## Print BFS implementation in JavaScript

Problem Given a graph and a starting vertex print the value of each vertex in a breadth first order. Let’s […]

## Optimising the BFS

Problem The input graph to the bfs function is in the form of edge list representation. from queue import deque […]

## Leetcode: Find-bottom-left-tree-value

Problem https://leetcode.com/problems/find-bottom-left-tree-value/ Given a binary tree, find the leftmost value in the last row of the tree. Example 1: Input: […]