摘要:
Given a 2D grid, each cell is either a wall 2, a zombie 1 or people 0 (the number zero, one, two).Zombies can turn the nearest people(up/down/left/rig 阅读全文
摘要:
Given a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is changed to the original key plus sum of all 阅读全文
摘要:
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 hou 阅读全文
摘要:
Given a knight in a chessboard (a binary matrix with 0 as empty and 1 as barrier) with a source position, find the shortest path to a destination posi 阅读全文
摘要:
Given two nodes in a binary tree (with parent pointer available), find their lowest common ancestor. Assumptions There is parent pointer for the nodes 阅读全文
摘要:
You are given a m x n 2D grid initialized with these three possible values. -1 - A wall or an obstacle.0 - A gate.INF - Infinity means an empty room. 阅读全文
摘要:
There is a new alien language which uses the latin alphabet. However, the order among letters are unknown to you. You receive a list of non-empty word 阅读全文
摘要:
There is a matrix beforebefore with nn rows and mm columns. For each element in before before[i][j]before[i][j], we will use the following algorithm t 阅读全文
摘要:
Given a string str and a dictionary dict, you need to find out which words in the dictionary are subsequences of the string and return those words.The 阅读全文