✅ [Rust] 0 ms, zip-any solution using HashSet (with detailed comments)
This solution employs a zip-any functional-style approach with HashSet used to store sums of neighbours. It demonstrated 0 ms runtime (100%) and used 2.1 MB mem
This [solution](https://leetcode.com/submissions/detail/793059284/) employs a zip-any functional-style approach with *HashSet* used to store sums of neighbours. It demonstrated **0 ms runtime (100%)** and used **2.1 MB memory (96.67%)**. Detailed comments are provided.\n\n**IF YOU LIKE THIS SOLUTION, PLEASE UPVOTE.**\n```\nuse std::collections::HashSet;\n\nimpl Solution {\n    pub fn find_subarrays(nums: Vec<i32>) -> bool \n    {\n        // [1] we store sums in a HashSet with preallocated capacity\n        let mut sums: HashSet<i32> = HashSet::<i32>::with_capacity(nums.len());\n        \n        // [2] to compute sums of neighbours, we zip them into a tuple (left,right)\n        nums[1..]\n            .iter()\n            .zip(nums.iter())\n            .any(|(&left,&right)| !sums.insert(left+right))\n        // [3] HashSet::insert returns whether or not the element was newly inserted;\n        //     .any() - checks for at least one duplicate sum\n    }\n}\n```
['Rust']