Daily challenge for 2026-07-21
567. Longest Run of Same Direction
You are given an array of strings directions representing the movement steps of a robot (e.g., "N", "S", "E", "W"). Find the length of the longest consecutive sequence of the exact same direction.
Example:Input: directions = ["N", "N", "S", "E", "E", "E", "N"]Output: 3
Run this challenge interactively in Python or JavaScript when the app loads.