1 2 3 4 5 ··· 18 下一页
摘要: Sort a linked list in O(n log n) time using constant space complexity. 思路:模拟merge sort。 阅读全文
posted @ 2016-09-01 11:14 fenshen371 阅读(124) 评论(0) 推荐(0) 编辑
摘要: Given an array of meeting time intervals consisting of start and end times [[s1,e1],[s2,e2],...] (si < ei), find the minimum number of conference room 阅读全文
posted @ 2016-08-31 13:08 fenshen371 阅读(1168) 评论(0) 推荐(0) 编辑
摘要: Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possib 阅读全文
posted @ 2016-08-31 09:00 fenshen371 阅读(154) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, find the length of the longest consecutive sequence path. The path refers to any sequence of nodes from some starting node to any 阅读全文
posted @ 2016-08-31 08:07 fenshen371 阅读(179) 评论(0) 推荐(0) 编辑
摘要: Given n points on a 2D plane, find if there is such a line parallel to y-axis that reflect the given points. Example 1: Given points = [[1,1],[-1,1]], 阅读全文
posted @ 2016-08-30 11:50 fenshen371 阅读(148) 评论(0) 推荐(0) 编辑
摘要: For a undirected graph with tree characteristics, we can choose any node as the root. The result graph is then a rooted tree. Among all possible roote 阅读全文
posted @ 2016-08-29 12:45 fenshen371 阅读(101) 评论(0) 推荐(0) 编辑
摘要: Given n nodes labeled from 0 to n - 1 and a list of undirected edges (each edge is a pair of nodes), write a function to check whether these edges mak 阅读全文
posted @ 2016-08-29 11:57 fenshen371 阅读(238) 评论(0) 推荐(0) 编辑
摘要: Given a 2D grid, each cell is either a wall 'W', an enemy 'E' or empty '0' (the number zero), return the maximum enemies you can kill using one bomb.T 阅读全文
posted @ 2016-08-29 08:46 fenshen371 阅读(507) 评论(0) 推荐(0) 编辑
摘要: You are given two integer arrays nums1 and nums2 sorted in ascending order and an integer k. Define a pair (u,v) which consists of one element from th 阅读全文
posted @ 2016-08-29 07:53 fenshen371 阅读(151) 评论(0) 推荐(0) 编辑
摘要: You are playing the following Flip Game with your friend: Given a string that contains only these two characters: + and -, you and your friend take tu 阅读全文
posted @ 2016-08-29 07:00 fenshen371 阅读(243) 评论(0) 推荐(0) 编辑
1 2 3 4 5 ··· 18 下一页