上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 14 下一页
摘要: Implement a magic directory with buildDict, and search methods. For the method buildDict, you'll be given a list of non-repetitive words to build a di 阅读全文
posted @ 2019-01-02 13:10 yuxihong 阅读(1097) 评论(0) 推荐(0) 编辑
摘要: Given two strings s1, s2, find the lowest ASCII sum of deleted characters to make two strings equal. Example 1: Example 2: Note: 0 < s1.length, s2.len 阅读全文
posted @ 2019-01-02 12:52 yuxihong 阅读(158) 评论(0) 推荐(0) 编辑
摘要: Given a function rand7 which generates a uniform random integer in the range 1 to 7, write a function rand10 which generates a uniform random integer 阅读全文
posted @ 2019-01-01 17:52 yuxihong 阅读(119) 评论(0) 推荐(0) 编辑
摘要: Given a list of directory info including directory path, and all the files with contents in this directory, you need to find out all the groups of dup 阅读全文
posted @ 2019-01-01 17:05 yuxihong 阅读(122) 评论(0) 推荐(0) 编辑
摘要: You are playing a simplified Pacman game. You start at the point (0, 0), and your destination is(target[0], target[1]). There are several ghosts on th 阅读全文
posted @ 2019-01-01 16:07 yuxihong 阅读(223) 评论(0) 推荐(0) 编辑
摘要: Runtime: 4 ms, faster than 46.79% of C++ online submissions for Print Binary Tree. 可以看出,矩阵宽度是所有节点的和,长度是树高+1。然后就是二分,但要注意边界值。 阅读全文
posted @ 2018-12-30 23:17 yuxihong 阅读(176) 评论(0) 推荐(0) 编辑
摘要: On a 2 dimensional grid with R rows and C columns, we start at (r0, c0) facing east. Here, the north-west corner of the grid is at the first row and c 阅读全文
posted @ 2018-12-30 22:51 yuxihong 阅读(128) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, we install cameras on the nodes of the tree. Each camera at a node can monitor its parent, itself, and its immediate children. Ca 阅读全文
posted @ 2018-12-30 20:17 yuxihong 阅读(611) 评论(0) 推荐(0) 编辑
摘要: Return all non-negative integers of length N such that the absolute difference between every two consecutive digits is K. Note that every number in th 阅读全文
posted @ 2018-12-30 17:13 yuxihong 阅读(869) 评论(0) 推荐(0) 编辑
摘要: A binary tree is univalued if every node in the tree has the same value. Return true if and only if the given tree is univalued. 太简单了,签到题。 阅读全文
posted @ 2018-12-30 17:10 yuxihong 阅读(91) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 14 下一页