摘要:
class MovingAverage { Queue<Integer> queue = new LinkedList<>(); int size = 0; double sum=0; public MovingAverage(int size) { this.size = size; } publ 阅读全文
摘要:
class Solution { public boolean isPalindrome(String s) { s= s.toLowerCase(); int i=0, j=s.length()-1; while(i<j){ char a = s.charAt(i); char b = s.cha 阅读全文
摘要:
We use two points to point to two successive nodes, we call them "pre" and "cur" We need to consider 3 situation need to be considered: 1. the inserte 阅读全文