上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 15 下一页
摘要: 参考:https://segmentfault.com/a/1190000003819886 在给定的一个序列中,我们可以得到: (1)不同长度 (2)且保证该升序序列在同长度升序序列中末尾最小的升序序列。 这些序列都是未来有可能成为最长序列的候选人。这样,每来一个新的数,我们便按照以下规则更新这些 阅读全文
posted @ 2017-04-04 18:38 Tsunami_lj 阅读(405) 评论(0) 推荐(0) 编辑
摘要: Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maxim 阅读全文
posted @ 2017-04-04 16:12 Tsunami_lj 阅读(79) 评论(0) 推荐(0) 编辑
摘要: Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of 阅读全文
posted @ 2017-04-04 14:10 Tsunami_lj 阅读(106) 评论(0) 推荐(0) 编辑
摘要: Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→… You must do this in-place without altering the nodes' values. For 阅读全文
posted @ 2017-04-04 11:29 Tsunami_lj 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 来源:https://discuss.leetcode.com/topic/50315/a-summary-how-to-use-bit-manipulation-to-solve-problems-easily-and-efficiently/2 WIKI Bit manipulation is 阅读全文
posted @ 2017-04-02 22:53 Tsunami_lj 阅读(199) 评论(0) 推荐(0) 编辑
摘要: You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Follow up:Could you do this in-place? 先贴上自己丑陋的代码:主 阅读全文
posted @ 2017-04-02 18:01 Tsunami_lj 阅读(104) 评论(0) 推荐(0) 编辑
摘要: Given an unsorted array of integers, find the length of the longest consecutive elements sequence. For example,Given [100, 4, 200, 1, 3, 2],The longes 阅读全文
posted @ 2017-04-02 11:48 Tsunami_lj 阅读(93) 评论(0) 推荐(0) 编辑
摘要: Reverse a linked list from position m to n. Do it in-place and in one-pass. For example:Given 1->2->3->4->5->NULL, m = 2 and n = 4, return 1->4->3->2- 阅读全文
posted @ 2017-04-01 21:53 Tsunami_lj 阅读(103) 评论(0) 推荐(0) 编辑
摘要: Given an array of citations (each citation is a non-negative integer) of a researcher, write a function to compute the researcher's h-index. According 阅读全文
posted @ 2017-04-01 21:36 Tsunami_lj 阅读(92) 评论(0) 推荐(0) 编辑
摘要: There is a list of sorted integers from 1 to n. Starting from left to right, remove the first number and every other number afterward until you reach 阅读全文
posted @ 2017-04-01 15:56 Tsunami_lj 阅读(136) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 15 下一页