Python Solution | Beats 100%
Intuition\n Describe your first thoughts on how to solve this problem. \n1. Categorization of Moves:\n    - "L": Represents a movement to the left.\n    - "R": 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n1. Categorization of Moves:\n    - `"L"`: Represents a movement to the left.\n    - `"R"`: Represents a movement to the right.\n    - `"_"`: Acts as a wildcard and can contribute to either L or R, hence it can maximize the distance.\n\n2. Understanding Movement:\n\n    - The net movement is determined by the difference between the total number of left moves (b) and right moves (c):\n    => `net_movement = \u2223\uD835\uDC4F\u2212\uD835\uDC50\u2223 `\n\n    - Wildcards (`"_"`) can increase the range by allowing additional moves in the direction that maximizes the total distance.\n\n3. Final Calculation:\n\n    - The total maximum distance is the absolute difference between L and R, plus the total count of `"_"`.\n# Approach\n<!-- Describe your approach to solving the problem. -->\n1. Count Occurrences:\n\n    - Use the `count()` method to determine the number of occurrences for each move `(L, R, _)`.\n2. Calculate Distance:\n\n    - Compute the absolute difference between the counts of L and R.\nAdd the count of _ to account for the wildcards.\n3. Return Result:\n\n    - The result represents the maximum possible distance achievable.\n# Complexity\n- Time complexity: $$O(N)$$\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n\n- Space complexity: $$O(1)$$\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```python3 []\nclass Solution:\n    def maxDistance(self, moves: str) -> int:\n        # Count the number of wildcard steps (\'_\')\n        a = moves.count(\'_\')\n        # Count the number of left (\'L\') and right (\'R\') moves\n        b = moves.count(\'L\')\n        c = moves.count(\'R\')\n        # Compute the maximum distance\n        return max(b, c) - min(b, c) + a\n           \n```
['String', 'Counting', 'Python3']