摘要:
232. 用栈实现队列 class MyQueue { Stack<Integer> stackIn; Stack<Integer> stackOut; public MyQueue() { stackIn = new Stack<>(); stackOut = new Stack<>(); } p 阅读全文
摘要:
344.反转字符串 - ez class Solution { public void reverseString(char[] s) { int left = 0, right = s.length - 1; char tmp; while (left < right) { tmp = s[lef 阅读全文
摘要:
【速速补充笔记】 977.有序数组的平方 class Solution { public int[] sortedSquares(int[] nums) { int left = 0, right = nums.length - 1, point = right; int[] answer = ne 阅读全文