摘要:
class Solution { public String getHint(String secret, String guess) { int bull = 0; int cow = 0; int[] mem = new int[10]; for(int i =0; i<secret.lengt 阅读全文
摘要:
一道难点并不在于编程和逻辑的算法题,更像是脑筋急转弯 从左右两侧向中间移动两根指针,同时保留两侧最大值 class Solution { public int trap(int[] height) { if (height==null||height.length < 3) { return 0; 阅读全文
摘要:
level order traversal solution in Java public class Solution { public List<Integer> rightView(TreeNode root) { // Write your solution here List<Intege 阅读全文
摘要:
class Solution { // using backtracking to build solution set; // traverse through the candidates list and try using each element as start point for bu 阅读全文