摘要:
【题目】 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 阅读全文
摘要:
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, 阅读全文
摘要:
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 阅读全文
摘要:
Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area. PS:将其化解为柱状图求最大体积的问题。先用动态规划的思路,将矩 阅读全文
摘要:
【题目】 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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文