> For the complete documentation index, see [llms.txt](https://851958789.gitbook.io/notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://851958789.gitbook.io/notes/0525_contiguous_array/slt.md).

# Solution1 hash

* 时间复杂度 O(n)
* 空间复杂度 O(n)

当0与1数量一致时(连续数组), 其连续数组的和为零。

cur 遇到 1 +1， 遇到 0 -1。

于是只要我们遇到了两个相同的 cur 中间的 1 和 0 的数量一定是相同的
