摘要:
链接 https://leetcode-cn.com/problems/fair-candy-swap/ 思路:假设从A中拿出y给B,从B中拿出x给A,则sumA+x-y=sumB-x+y, 即y=(sumA-sumB)/2+x public int[] fairCandySwap(int[] A, 阅读全文
posted @ 2021-02-02 10:44
withwind777
阅读(75)
评论(0)
推荐(0)
摘要:
链接 https://leetcode-cn.com/problems/longest-substring-without-repeating-characters/ 思路一:双指针+HashSet 官方题解 class Solution { public int lengthOfLongestSu 阅读全文
posted @ 2021-02-02 10:20
withwind777
阅读(64)
评论(0)
推荐(0)

浙公网安备 33010602011771号