摘要:
public class Solution { public int divide(int dividend, int divisor) { boolean isNegtive=dividend0||dividend>0&&divisor=ldivisor) { if(ldividend>=l) { ... 阅读全文
摘要:
http://blog.csdn.net/v_july_v/article/details/7041827 阅读全文
摘要:
class Solution { public ListNode reverseKGroup(ListNode head, int k) { if(head==null||k==1) return head; ListNode preNode=new ListNode(0); preNode.next=head; ... 阅读全文
摘要:
Iteration 阅读全文
摘要:
class Solution { public ListNode mergeKLists(ListNode[] lists) { PriorityQueue que=new PriorityQueue((a,b)->a.val-b.val); for(ListNode list:lists) if(list!=null) ... 阅读全文
摘要:
public class Solution { public List generateParenthesis(int n) { List ret=new ArrayList(); generateParenthesis("", 0, 2*n, ret); return ret; } void generateParenth... 阅读全文
摘要:
public class Solution { public ListNode removeNthFromEnd(ListNode head, int n) { ListNode pre=new ListNode(0); pre.next=head; ListNode p=pre,q=pre; for(int i=0;i<n... 阅读全文
摘要:
public class Solution { public List> fourSum(int[] nums, int target) { List> ret=new ArrayList>(); Arrays.sort(nums); for(int i=0;i<nums.length;i++) i... 阅读全文
摘要:
public class Solution { public List letterCombinations(String digits) { LinkedList que=new LinkedList(); if(digits.length()==0) return que; String[] btns=new S... 阅读全文