上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 33 下一页
摘要: 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 阅读全文
posted @ 2020-03-25 10:02 xuan_abc 阅读(161) 评论(0) 推荐(0)
摘要: 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 阅读全文
posted @ 2020-03-23 03:48 xuan_abc 阅读(118) 评论(0) 推荐(0)
摘要: 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 阅读全文
posted @ 2020-03-22 22:57 xuan_abc 阅读(93) 评论(0) 推荐(0)
摘要: Rotate String by n place. Lower Case keeps lower, upper keep upper e.g. abc, 2 -> cde abAB 2 -> cdCD public String rotate(String str, int n) { char[] 阅读全文
posted @ 2020-03-21 11:31 xuan_abc 阅读(106) 评论(0) 推荐(0)
摘要: 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 阅读全文
posted @ 2020-03-20 11:56 xuan_abc 阅读(130) 评论(0) 推荐(0)
摘要: Given two nodes in a binary tree (with parent pointer available), find their lowest common ancestor. Assumptions There is parent pointer for the nodes 阅读全文
posted @ 2020-03-20 09:58 xuan_abc 阅读(105) 评论(0) 推荐(0)
摘要: 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. 阅读全文
posted @ 2020-03-19 05:03 xuan_abc 阅读(202) 评论(0) 推荐(0)
摘要: 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 阅读全文
posted @ 2020-03-19 03:38 xuan_abc 阅读(192) 评论(0) 推荐(0)
摘要: 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 阅读全文
posted @ 2020-03-18 09:39 xuan_abc 阅读(330) 评论(0) 推荐(0)
摘要: 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 阅读全文
posted @ 2020-03-18 05:28 xuan_abc 阅读(262) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 33 下一页