随笔分类 -  算法

摘要:582. Kill Process 582. Kill Process Given n processes, each process has a unique PID (process id) and its PPID (parent process id). Each process only 阅读全文
posted @ 2017-05-16 13:31 陆小风不写代码 阅读(233) 评论(0) 推荐(0)
摘要:554. Brick Wall 554. Brick Wall There is a brick wall in front of you. The wall is rectangular and has several rows of bricks. The bricks have the sam 阅读全文
posted @ 2017-04-12 13:48 陆小风不写代码 阅读(227) 评论(0) 推荐(0)
摘要:367. Valid Perfect Square 367. Valid Perfect Square Given a positive integer num, write a function which returns True if num is a perfect square else 阅读全文
posted @ 2017-04-12 13:44 陆小风不写代码 阅读(145) 评论(0) 推荐(0)
摘要:537. Complex Number Multiplication 537. Complex Number Multiplication Given two strings representing two complex numbers. You need to return a string 阅读全文
posted @ 2017-04-10 21:21 陆小风不写代码 阅读(174) 评论(0) 推荐(0)
摘要:557. Reverse Words in a String III 557. Reverse Words in a String III Given a string, you need to reverse the order of characters in each word within 阅读全文
posted @ 2017-04-10 21:18 陆小风不写代码 阅读(126) 评论(0) 推荐(0)
摘要:368. Largest Divisible Subset 368. Largest Divisible Subset Given a set of distinct positive integers, find the largest subset such that every pair (S 阅读全文
posted @ 2017-03-23 15:05 陆小风不写代码 阅读(135) 评论(0) 推荐(0)
摘要:542. 01 Matrix 542. 01 Matrix Given a matrix consists of 0 and 1, find the distance of the nearest 0 for each cell. The distance between two adjacent 阅读全文
posted @ 2017-03-22 12:37 陆小风不写代码 阅读(430) 评论(0) 推荐(0)
摘要:538. Convert BST to Greater Tree 538. Convert BST to Greater Tree Given a Binary Search Tree (BST), convert it to a Greater Tree such that every key o 阅读全文
posted @ 2017-03-22 10:23 陆小风不写代码 阅读(156) 评论(0) 推荐(0)
摘要:543. Diameter of Binary Tree 543. Diameter of Binary Tree Given a binary tree, you need to compute the length of the diameter of the tree. The diamete 阅读全文
posted @ 2017-03-21 12:44 陆小风不写代码 阅读(285) 评论(0) 推荐(0)
摘要:503. Next Greater Element II 503. Next Greater Element II Given a circular array (the next element of the last element is the first element of the arr 阅读全文
posted @ 2017-03-16 21:40 陆小风不写代码 阅读(142) 评论(0) 推荐(0)
摘要:526. Beautiful Arrangement 526. Beautiful Arrangement Suppose you have N integers from 1 to N. We define a beautiful arrangement as an array that is c 阅读全文
posted @ 2017-03-16 13:17 陆小风不写代码 阅读(196) 评论(0) 推荐(0)
摘要:524. Longest Word in Dictionary through Deleting 524. Longest Word in Dictionary through Deleting Given a string and a string dictionary, find the lon 阅读全文
posted @ 2017-03-16 09:59 陆小风不写代码 阅读(604) 评论(0) 推荐(0)
摘要:541. Reverse String II Given a string and an integer k, you need to reverse the first k characters for every 2k characters counting from the start of 阅读全文
posted @ 2017-03-15 12:44 陆小风不写代码 阅读(175) 评论(0) 推荐(0)
摘要:523. Continuous Subarray Sum Add to List Given a list of non-negative numbers and a target integer k, write a function to check if the array has a con 阅读全文
posted @ 2017-03-14 12:34 陆小风不写代码 阅读(231) 评论(0) 推荐(0)
摘要:Given a list of 24-hour clock time points in "Hour:Minutes" format, find the minimum minutes difference between any two time points in the list. Examp 阅读全文
posted @ 2017-03-14 08:46 陆小风不写代码 阅读(324) 评论(0) 推荐(0)