摘要: 1、leetcode344 反转字符串 代码实现【双指针法,原地修改数组】 class Solution { public void reverseString(char[] s) { int left = 0; int right = s.length-1; while(right>=left){ 阅读全文
posted @ 2023-01-18 23:55 黄三七 阅读(48) 评论(0) 推荐(0)
摘要: 1、leetcode454 四数相加 代码实现 class Solution { public int fourSumCount(int[] nums1, int[] nums2, int[] nums3, int[] nums4) { HashMap<Integer,Integer> sumOfN 阅读全文
posted @ 2023-01-18 00:26 黄三七 阅读(23) 评论(0) 推荐(0)