Given a binary tree root, return whether it’s a binary search tree. A binary tree node is a binary search tree if : All nodes on its left subtree …
Given a binary tree, you are asked to check whether it is a mirror of itself (i.e, symmetric around its center): https://leetcode.com/problems/symmetric-tree/ For example, this binary tree is symmetric: …
The thief has found himself a new place for his thievery again. There is only one entrance to this area, called the “root.” Besides the root, each house has …
April 15, 2015
algorithms, BFS, Breadth First Search, c / c++, Depth First Search, DFS, Dynamic Programming, dynamic programming, Memoization, python, Recursion
You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each …
The full permutation of a list can be easily programmed using recursive algorithms. The number of the full permutation results is where is the number of elements to permutate. …