[JavaScript] Easy Sliding Window With Explanation & Analysis - O(n) time O(1) space
Explanation:\n1. Increase the size of the window by incrementing the end index.\n2. After each increment, check if the size of the window (end - start + 1) is g
**Explanation:**\n1. Increase the size of the window by incrementing the end index.\n2. After each increment, check if the size of the window ```(end - start + 1)``` is greater than the current max size (power). \n3. Repeat steps 1 and 2 until the start and end characters of the window are no longer equal, then move to the start index to the same position as the end index to begin checking the next substring with unique characters.\n\n**Solution:**\n```javascript\nvar maxPower = function(s) {\n    let power = 1\n    \n    let start = 0\n    for (let end = 1; end < s.length; end++) {\n        if (s[start] !== s[end]) {\n            start = end\n        }\n            \n        power = Math.max(power, end - start + 1)\n    }\n    \n    return power\n};\n```\n\n**Complexity:**\n* Time: O(n) where n = s.length\n* Space: O(1)
['JavaScript']