摘要:
public class Solution { public int findPeakElement(int[] nums) { int left = 0; int right = nums.length - 1; while (left + 1 n... 阅读全文
posted @ 2015-12-03 15:44
Weizheng_Love_Coding
阅读(119)
评论(0)
推荐(0)
摘要:
public class ZigzagIterator { private List v1; private List v2; private int p1; private int p2; private boolean flg = true; publ... 阅读全文
posted @ 2015-12-03 13:44
Weizheng_Love_Coding
阅读(123)
评论(0)
推荐(0)
摘要:
public class Solution { List result = new ArrayList(); public List letterCombinations(String digits) { if (digits.length() == 0) { ... 阅读全文
posted @ 2015-12-03 10:13
Weizheng_Love_Coding
阅读(114)
评论(0)
推荐(0)
摘要:
public class Solution { public ListNode addTwoNumbers(ListNode l1, ListNode l2) { int carry = 0; ListNode result = new ListNode(0); ... 阅读全文
posted @ 2015-12-03 09:50
Weizheng_Love_Coding
阅读(112)
评论(0)
推荐(0)
摘要:
思路和ugly2一样,不过是变成了一组factor,用一个priority求出每次最小的,同时维护一个conut数组,记录每个factor走的次数有一个500000的过不了,超限了,无耻的写了一行作弊的代码public class Solution { public int nthSuperU... 阅读全文
posted @ 2015-12-03 09:20
Weizheng_Love_Coding
阅读(198)
评论(0)
推荐(0)
摘要:
public class Solution { public int removeElement(int[] nums, int val) { if (nums.length == 0) { return 0; } int lef... 阅读全文
posted @ 2015-12-03 03:04
Weizheng_Love_Coding
阅读(121)
评论(0)
推荐(0)
摘要:
public class Solution { public String convert(String s, int numRows) { if (numRows == 1) { return s; } int flg = 0;... 阅读全文
posted @ 2015-12-03 02:09
Weizheng_Love_Coding
阅读(123)
评论(0)
推荐(0)
摘要:
public class LRUCache { HashMap map = new HashMap(); ListNode start; ListNode end; int capacity; int cur_size; public LRUCache(int c... 阅读全文
posted @ 2015-12-03 01:59
Weizheng_Love_Coding
阅读(120)
评论(0)
推荐(0)

浙公网安备 33010602011771号