发布时间:2015-09-19 10:50:28
//Given a string s1 , we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.<br />//<br />//Below is one possible representation of s1 = "great" :<br />//<br />//great<br />// / \<br />// gr eat<br />// / \  .........【阅读全文】
发布时间:2015-09-19 10:49:54
<br /><br />public class PartitionList {<br /><br /><br />public static void main(String[] args) {<br />// TODO Auto-generated method stub<br /><br /><br />}<br />public ListNode partition(ListNode head, int x) {<br /> ListNode p=head;<br /> ListNode prehe.........【阅读全文】
发布时间:2015-09-19 10:49:29
//Largest Rectangle in Histogram My Submissions Question Solution <br />//Total Accepted: 44118 Total Submissions: 193905 Difficulty: Hard<br />//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 h.........【阅读全文】
发布时间:2015-09-19 10:48:46
import java.util.Stack;<br /><br /><br />public class MaximalRectangle {<br /><br /><br />public static void main(String[] args) {<br />// TODO Auto-generated method stub<br /><br /><br />}<br />public int maximalRectangle(char[][] matrix) {<br /> int m=matrix.length;<br />.........【阅读全文】
发布时间:2015-09-12 16:11:56
/Remove Duplicates from Sorted List My Submissions Question Solution <br />//Total Accepted: 74313 Total Submissions: 214827 Difficulty: Easy<br />//Given a sorted linked list, delete all duplicates such that each element appear only once.<br />//<br />//For example,<br />//Given 1->1-.........【阅读全文】