摘要:
理解 该题用到了滑动窗口 代码 class Solution { public int minSubArrayLen(int target, int[] nums) { int left = 0, right = 0; int sum = 0; int result = Integer.MAX_VA 阅读全文
摘要:
理解 比较数组两端的元素,一定能比较出一个最大的数字 代码 class Solution { public int[] sortedSquares(int[] nums) { int left=0, right = nums.length - 1; int[] resultArr = new int 阅读全文
摘要:
题目链接 代码 class Solution { public int removeElement(int[] nums, int val) { int fast = 0, slow = 0; for( ; fast<nums.length; fast++) { if (nums[fast] != 阅读全文
摘要:
public class TestDemo { @Test public void testCountDownLatch() throws InterruptedException { CountDownLatch countDownLatch = new CountDownLatch(5); fo 阅读全文