halfrost / S2

S2 geometry library in Go | experiment version
Apache License 2.0
21 stars 5 forks source link

0992. Subarrays with K Different Integers | LeetCode Cookbook #832

Open loftea opened 2 years ago

loftea commented 2 years ago

这道题将字典改成 []int 切片能够节省空间到 96%(其实和 100% 没区别),同时时间复杂度直接到 100%。

因为有条件:1 <= A[i] <= A.length