## Leetcode - 212. Word Search II

Algorithms, Backtracking, Trie

###### Problem Statement

Given a 2D board and a list of words from the dictionary, find all words in the board.

Read MoreRamblings and teachings on topics of interest to me.

Algorithms, Backtracking, Trie

Given a 2D board and a list of words from the dictionary, find all words in the board.

Read MoreAlgorithms, Array, Backtracking, Depth First Search

Given a 2D board and a word, find if the word exists in the grid.

Read MoreAlgorithms, Binary Tree, Breadth First Search, Depth First Search

Given the `root`

node of a Binary Tree, a `target`

node and a distance `k`

, return a list of all nodes that are a distance `k`

from the `target`

.

Algorithms, Array, Binary Search

This is straight up Binary Search problem with some modifications. When we find the mid point of the given array, one of two things will hold true:

Read MoreAlgorithms, Array, Recursion, Two Pointers, Leetcode

There’s one thing common between this problem and the Container With Most Water problem and that is the height of the shorter tower dictates the result. In this problem, the amount of water that can accumulate between two towers is limited by the height of the shorter tower. Consider an array [4, 5, 9, 7 ,1, 0 ,4, 0 ,8 ,6 ,5 ,2 ,3] which is represented as:

Read MoreAlgorithms, Backtracking, Recursion, String, Leetcode

Before we start solving this problem, let’s do some math first. The problem statement clearly states that we have *N* pairs of parentheses to work with. That means for a string to be considered as part of the solution, it must be of size *2N*.