发布时间:2015-09-21 16:51:40
//Reverse Linked List II My Submissions Question Solution <br />//Total Accepted: 50939 Total Submissions: 195918 Difficulty: Medium<br />//Reverse a linked list from position m to n. Do it in-place and in one-pass.<br />//<br />//For example:<br />//Given 1->2->3->4->5->NUL.........【阅读全文】
发布时间:2015-09-20 10:42:15
import java.util.ArrayList;<br />import java.util.Arrays;<br />import java.util.HashSet;<br />import java.util.List;<br />import java.util.Set;<br /><br /><br />//Subsets II My Submissions Question Solution <br />//Total Accepted: 47526 Total Submissions: 169953 Difficulty: Medium<br /.........【阅读全文】
发布时间:2015-09-19 15:40:02
//Gray Code My Submissions Question Solution <br />//Total Accepted: 42115 Total Submissions: 126486 Difficulty: Medium<br />//The gray code is a binary numeral system where two successive values differ in only one bit.<br />//<br />//Given a non-negative integer n representing the total nu.........【阅读全文】
发布时间: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.........【阅读全文】