【LetMeFly】3146.两个字符串的排列差:小数据,我选择暴力模拟
力扣题目链接:https://leetcode.cn/problems/permutation-difference-between-two-strings/
给你两个字符串 s 和 t,每个字符串中的字符都不重复,且 t 是…
力扣2025.分割数组的最多方案数 哈希表 前缀和 用两个哈希表分别存元素(之后会遍历)左侧和右侧的前缀和 typedef long long LL;class Solution {public:int waysToPartition(vector<int>& nums, int k) {int n nums.size(),ans 0;vector<LL> sum(n);unor…