LeetCode Contest 344

6416. Find the Distinct Difference Array 给你一个下标从 0 开始的数组 nums ,数组长度为 n 。 nums 的 不同元素数目差 数组可以用一个长度为 n 的数组 diff 表示,其中 diff 等于前缀 nums 中不同元素的数目 减去 后缀 nums 中不同元素的数目。 返回…