摘要:
https://leetcode.com/problems/evaluate-division/ public class Solution { private Map mp; private class Item { public String str; public double prop; public Item(Strin... 阅读全文
posted @ 2016-09-18 23:51
blcblc
阅读(253)
评论(0)
推荐(0)
摘要:
https://leetcode.com/problems/random-pick-index/ public class Solution { private Map mp; private Random rand; public Solution(int[] nums) { mp = new HashMap(); for ... 阅读全文
posted @ 2016-09-18 10:41
blcblc
阅读(228)
评论(0)
推荐(0)
摘要:
https://leetcode.com/problems/integer-replacement/ // 除了首位的1,其他的1需要2次操作,0需要1次操作。 // 所以尽量把1变成0 // 所以,3直接得出结果2, // 其他的,01->-1,11->+1 public class Solution { public int integerReplacement(int inn)... 阅读全文
posted @ 2016-09-18 00:00
blcblc
阅读(216)
评论(0)
推荐(0)