✅ [Python/C++/Java/Rust] simple min/max operations (with detailed comments)
\u2705 IF YOU LIKE THIS SOLUTION, PLEASE UPVOTE.\n*\nThis solution employs simple min and max operations. Time complexity is linear: *O(N). Space complexity is 
**\u2705 IF YOU LIKE THIS SOLUTION, PLEASE UPVOTE.**\n****\nThis solution employs simple min and max operations. Time complexity is linear: **O(N)**. Space complexity is constant: **O(1)**. \n| **Language** | [**Python**](https://leetcode.com/submissions/detail/829388260/) | [**C++**](https://leetcode.com/submissions/detail/829376733/) | [**Java**](https://leetcode.com/submissions/detail/829383379/) | [**Rust**](https://leetcode.com/submissions/detail/829390159/) | \n|---|---|---|---|---|\n| **Runtime** | **1084 ms (93.30%)** | **93 ms (99.88%)** | **1 ms (100.00%)** | **4 ms (99.72%)** |\n| **Memory** | **25.0 MB  (85.47%)** | **93.5 MB (8.10%)** | **58.8 MB  (94.22%)** | **3.0 MB  (66.34%)** |\n\n<iframe src="https://leetcode.com/playground/7ktsghLD/shared" frameBorder="0" width="800" height="400"></iframe>
['C', 'Python', 'Java', 'Rust']