摘要: 2D平面上,有m个人(P),n辆自行车(B),还有空白(O)满足以下条件1.m < n. 2.不存在两个人,到同一辆自行车距离相等, 距离用abs(x1-x2) + abs(y1-y2)定义3.每个人尽量找离自己最近的自行车,一旦某辆自行车被占,其他人只能找别的自行车。例OPOBOOPOOOOOOO 阅读全文
posted @ 2018-10-18 09:34 轻风舞动 阅读(4214) 评论(0) 推荐(0) 编辑
摘要: Given a 2D matrix matrix, find the sum of the elements inside the rectangle defined by its upper left corner (row1, col1) and lower right corner (row2 阅读全文
posted @ 2018-10-18 09:31 轻风舞动 阅读(375) 评论(0) 推荐(0) 编辑
摘要: Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. Example: Given nums = [-2, 0, 3, -5, 2, -1] sumR 阅读全文
posted @ 2018-10-18 09:13 轻风舞动 阅读(394) 评论(0) 推荐(0) 编辑
摘要: You are given a campus map with the Google buildings, roads and Google bikes. You have to help the employee find the nearest Google bike. Campus map: 阅读全文
posted @ 2018-10-18 08:08 轻风舞动 阅读(806) 评论(0) 推荐(0) 编辑
摘要: What are the differences between a process and a thread? How are they similar? How can 2 threads communicate? How can 2 process communicate? Both proc 阅读全文
posted @ 2018-10-18 07:36 轻风舞动 阅读(441) 评论(0) 推荐(0) 编辑
摘要: Given a family tree for a few generations for the entire population and two people write a routine that will find out if they are blood related. Sibli 阅读全文
posted @ 2018-10-18 05:15 轻风舞动 阅读(892) 评论(0) 推荐(0) 编辑
摘要: 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 @ 2018-10-18 04:36 轻风舞动 阅读(618) 评论(0) 推荐(0) 编辑
摘要: You are given an integer array sorted in ascending order (may contain duplicates), you need to split them into several subsequences, where each subseq 阅读全文
posted @ 2018-10-18 02:23 轻风舞动 阅读(566) 评论(0) 推荐(0) 编辑