
文章平均质量分 72
lilibaobao89
这个作者很懒,什么都没留下…
展开
-
526. Beautiful Arrangement
Suppose you have N integers from 1 to N. We define a beautiful arrangement as an array that is constructed by these N numbers successfully if one of the following is true for the ith position (1 ≤ i原创 2017-05-12 12:55:58 · 229 阅读 · 0 评论 -
279. Perfect Squares
Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...) which sum to n. For example, given n = 12, return 3 because 12 = 4 + 4 + 4; given n =原创 2017-05-07 13:46:28 · 254 阅读 · 0 评论 -
447. Number of Boomerangs
Given n points in the plane that are all pairwise distinct, a "boomerang" is a tuple of points (i, j, k) such that the distance between i and j equals the distance between i and k (the order of原创 2017-06-13 06:49:13 · 236 阅读 · 0 评论 -
317. Shortest Distance from All Buildings
You want to build a house on an empty land which reaches all buildings in the shortest amount of distance. You can only move up, down, left and right. You are given a 2D grid of values 0, 1 or 2, wh原创 2017-07-08 03:10:16 · 226 阅读 · 0 评论 -
582. Kill Process
Given n processes, each process has a unique PID (process id) and its PPID (parent process id). Each process only has one parent process, but may have one or more children processes. This is just l原创 2017-07-08 06:22:57 · 323 阅读 · 0 评论