Stay Hungry,Stay Foolish!

摘要: 209. 长度最小的子数组 https://leetcode.cn/problems/minimum-size-subarray-sum/?envType=study-plan-v2&envId=top-interview-150 思路 三种方法中,具有最优时间复杂度的方案 滑动窗口 设置 star 阅读全文
posted @ 2024-03-18 23:06 lightsong 阅读(2) 评论(0) 推荐(0) 编辑
摘要: C - One Time Swap https://atcoder.jp/contests/abc345/tasks/abc345_c 思路 组合计数, 假设字符串中所有位置的字符都不相同,求所有位置字符交换的组合数 对于相同字符的位置, 任意两个位置交换不会改变字符串 所以计算所有这种无效贡献 注 阅读全文
posted @ 2024-03-18 08:49 lightsong 阅读(15) 评论(0) 推荐(0) 编辑
Life Is Short, We Need Ship To Travel