上一页 1 ··· 32 33 34 35 36 37 38 39 40 ··· 72 下一页
摘要: 合并区间 : 56. Merge Intervals(56. 合并区间 排序+双指针) 快慢指针: 141. Linked List Cycle(快慢指针 判断链表是否有环) 142. Linked List Cycle II(快慢指针--找出链表相交的节点) 876. 链表的中间结点 19. Re 阅读全文
posted @ 2018-05-07 17:29 乐乐章 阅读(125) 评论(0) 推荐(0)
摘要: Given a sorted array nums, remove the duplicates in-place such that duplicates appeared at most twice and return the new length. Do not allocate extra 阅读全文
posted @ 2018-05-07 17:18 乐乐章 阅读(189) 评论(0) 推荐(0)
摘要: Given an array nums and a value val, remove all instances of that value in-place and return the new length. Do not allocate extra space for another ar 阅读全文
posted @ 2018-05-07 16:37 乐乐章 阅读(173) 评论(0) 推荐(0)
摘要: Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n). Example: Input: S = "ADOB 阅读全文
posted @ 2018-05-07 13:34 乐乐章 阅读(257) 评论(0) 推荐(0)
摘要: Given an array of n positive integers and a positive integer s, find the minimal length of a contiguous subarray of which the sum ≥ s. If there isn't 阅读全文
posted @ 2018-05-06 09:45 乐乐章 阅读(179) 评论(0) 推荐(0)
摘要: The demons had captured the princess (P) and imprisoned her in the bottom-right corner of a dungeon. The dungeon consists of M x N rooms laid out in a 阅读全文
posted @ 2018-05-05 23:40 乐乐章 阅读(299) 评论(0) 推荐(0)
摘要: https://labuladong.gitbook.io/algo/mu-lu-ye/er-fen-cha-zhao-xiang-jie 1 int binary_search(int[] nums, int target) { 2 int left = 0, right = nums.lengt 阅读全文
posted @ 2018-05-05 22:30 乐乐章 阅读(120) 评论(0) 推荐(0)
摘要: Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted f 阅读全文
posted @ 2018-05-05 21:50 乐乐章 阅读(205) 评论(0) 推荐(0)
摘要: Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,0,1,2,2,5,6] might become [2,5,6,0,0,1,2]). Y 阅读全文
posted @ 2018-05-05 21:36 乐乐章 阅读(132) 评论(0) 推荐(0)
摘要: Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]). Y 阅读全文
posted @ 2018-05-05 21:28 乐乐章 阅读(1674) 评论(0) 推荐(0)
上一页 1 ··· 32 33 34 35 36 37 38 39 40 ··· 72 下一页