上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 28 下一页
摘要: public final int getAndAddInt(Object o, long offset, int delta) { int v; do { v = getIntVolatile(o, offset); } while (!compareAndSwapInt(o, offset, v, v + delta));... 阅读全文
posted @ 2017-03-25 17:24 友哥 阅读(157) 评论(0) 推荐(0)
摘要: private final Node[] initTable() { Node[] tab; int sc; while ((tab = table) == null || tab.length == 0) { if ((sc = sizeCtl) 0) ? sc : DEFAULT_CAPACITY; ... 阅读全文
posted @ 2017-03-25 15:46 友哥 阅读(181) 评论(0) 推荐(0)
摘要: public class Solution { /** * @param s: The first string * @param b: The second string * @return true or false */ public boolean anagram(String s, String t) { // w... 阅读全文
posted @ 2017-02-21 20:29 友哥 阅读(356) 评论(0) 推荐(0)
摘要: // you can also use imports, for example: // import java.util.*; // you can write to stdout for debugging purposes, e.g. // System.out.println("this is a debug message"); class Solution { publi... 阅读全文
posted @ 2017-02-18 15:33 友哥 阅读(450) 评论(0) 推荐(0)
摘要: /** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */ public class Solution { ... 阅读全文
posted @ 2017-02-18 12:05 友哥 阅读(160) 评论(0) 推荐(0)
摘要: public int sumArray(int[] nums, int start, int end) { int i=0; int sum=0; for(i=start;i word0(String[] strings) { int i=0; Map wordMap = new HashMap(); while(i keyPosMap = new HashMap(); ... 阅读全文
posted @ 2017-02-15 22:37 友哥 阅读(152) 评论(0) 推荐(0)
摘要: http://codingbat.com/prob/p159339 阅读全文
posted @ 2017-02-15 22:03 友哥 阅读(122) 评论(0) 推荐(0)
摘要: http://codingbat.com/prob/p134174 阅读全文
posted @ 2017-02-15 21:18 友哥 阅读(93) 评论(0) 推荐(0)
摘要: http://codingbat.com/prob/p191212 阅读全文
posted @ 2017-02-15 21:05 友哥 阅读(178) 评论(0) 推荐(0)
摘要: http://codingbat.com/prob/p100369 阅读全文
posted @ 2017-02-14 22:45 友哥 阅读(203) 评论(0) 推荐(0)
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 28 下一页