摘要:
private final Node[] initTable() { Node[] tab; int sc; while ((tab = table) == null || tab.length == 0) { if ((sc = sizeCtl) 0) ? sc : DEFAULT_CAPACITY; ... 阅读全文
摘要:
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... 阅读全文
摘要:
// 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... 阅读全文
摘要:
/** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */ public class Solution { ... 阅读全文
摘要:
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(); ... 阅读全文
摘要:
http://codingbat.com/prob/p159339 阅读全文
摘要:
http://codingbat.com/prob/p134174 阅读全文
摘要:
http://codingbat.com/prob/p191212 阅读全文