上一页 1 2 3 4 5 6 7 ··· 16 下一页
摘要: 题目: Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order r 阅读全文
posted @ 2017-12-21 09:37 荒野第一快递员 阅读(443) 评论(0) 推荐(0) 编辑
摘要: 题目: Follow up for "Remove Duplicates":What if duplicates are allowed at most twice? For example,Given sorted array nums = [1,1,1,2,2,3], Your function 阅读全文
posted @ 2017-12-19 09:45 荒野第一快递员 阅读(190) 评论(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). W 阅读全文
posted @ 2017-12-18 10:32 荒野第一快递员 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a sorted linked list, delete all duplicates such that each element appear only once. For example,Given 1->1->2, return 1->2.Given 1->1->2->3 阅读全文
posted @ 2017-12-17 21:46 荒野第一快递员 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. For example,Given  阅读全文
posted @ 2017-12-17 21:44 荒野第一快递员 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing only 1's and return its area. For example, given the follo 阅读全文
posted @ 2017-12-16 20:42 荒野第一快递员 阅读(283) 评论(0) 推荐(0) 编辑
摘要: 题目: Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the 阅读全文
posted @ 2017-12-16 19:54 荒野第一快递员 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserve 阅读全文
posted @ 2017-12-16 10:28 荒野第一快递员 阅读(303) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively. Below is one possible represen 阅读全文
posted @ 2017-12-15 20:26 荒野第一快递员 阅读(227) 评论(0) 推荐(0) 编辑
摘要: 题目: Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. Note:You may assume that nums1 has enough space (size 阅读全文
posted @ 2017-12-10 21:26 荒野第一快递员 阅读(419) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 16 下一页