摘要:
【题目】 Suppose a sorted array 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). You are given a targ 阅读全文
posted @ 2017-06-23 23:26
鸭子船长
阅读(220)
评论(0)
推荐(0)
摘要:
I、Given a sorted linked list, delete all duplicates such that each element appear only once. For example,Given1->1->2, return1->2.Given1->1->2->3->3, 阅读全文
posted @ 2017-06-23 23:11
鸭子船长
阅读(165)
评论(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 hist 阅读全文
posted @ 2017-06-23 22:56
鸭子船长
阅读(289)
评论(0)
推荐(0)
摘要:
Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area. PS:将其化解为柱状图求最大体积的问题。先用动态规划的思路,将矩 阅读全文
posted @ 2017-06-23 22:50
鸭子船长
阅读(1170)
评论(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-06-23 15:24
鸭子船长
阅读(271)
评论(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 representati 阅读全文
posted @ 2017-06-23 15:11
鸭子船长
阅读(238)
评论(0)
推荐(0)
摘要:
Given two sorted integer arrays A and B, merge B into A as one sorted array. Note: You may assume that A has enough space to hold additional elements 阅读全文
posted @ 2017-06-23 14:33
鸭子船长
阅读(207)
评论(0)
推荐(0)
摘要:
The gray code is a binary numeral system where two successive values differ in only one bit. Given a non-negative integer n representing the total num 阅读全文
posted @ 2017-06-23 14:29
鸭子船长
阅读(311)
评论(0)
推荐(0)

浙公网安备 33010602011771号