According to the definition of tree on Wikipedia: “a tree is an undirected graph in which any two vertices are connected by exactly one path. In other words, any …
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 …
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 …
This is an actual technical exercise before interview (my friend asked me for help). The PDF requirement could be accessed . The problem statement is simple and clear, in …