Rust solutions (8 ms & 0 ms)
Simple solution with sort (O(N logN)). Runtime =  8 ms\n\nimpl Solution {\n    pub fn largest_perimeter(mut nums: Vec<i32>) -> i32 {\n        nums.sort_unstable
1. Simple solution with sort (O(N logN)). Runtime =  **8 ms**\n```\nimpl Solution {\n    pub fn largest_perimeter(mut nums: Vec<i32>) -> i32 {\n        nums.sort_unstable_by(|a, b| b.cmp(a));\n        match nums.windows(3).find(|l| l[0] < l[1] + l[2]) {\n            Some(l) => l.iter().sum(),\n            None => 0,\n        }\n    }\n}\n```\n2. Solution with BinaryHeap (O(N logK)). Runtime =  **0 ms**\n```\n impl Solution {\n    pub fn largest_perimeter(mut nums: Vec<i32>) -> i32 {\n        let mut heap = std::collections::BinaryHeap::from(nums);\n        let (mut b, mut c) = (-1, -1);\n        while let Some(a) = heap.pop() {\n            if a > 0 && b > 0 && c > 0 && c < b + a {\n                return a + b + c;\n            }\n            c = b;\n            b = a;\n        }\n        0\n    }\n}\n```
['Sliding Window', 'Sorting', 'Rust']