Template

Leetcode Problem #

Leetcode Easy


Problem #

Example #

Example 1: #

Constraints #

Follow up #


Approach and Intuition #

1. Naive approach #

Time Complexity: \( O(n) \)

Space Complexity: \( O(1) \)


Complete Solution #