Given a binary tree, count the number of uni-value subtrees. A Uni-value subtree means all nodes of the subtree have the same value. Example : Input: root = 5 …
Given a reference of a node in a connected undirected graph, return a deep copy (clone) of the graph. Each node in the graph contains a val (int) and …
Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. An example is the root-to-leaf path 1->2->3 which represents the number 123. Find …
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 …