Python solution with O(n) time complexity and O(1) space complexity
Intuition\nAs per problem definition task is maximize dist, where R mean moving in forward direction and left means in backward. User can move either fwd or bac
# Intuition\nAs per problem definition task is maximize dist, where R mean moving in forward direction and left means in backward. User can move either fwd or backward in case of blank. Solution will be to get absolute differnce of left and right and adding all blanks to result which will maximize the dist\n\n# Approach\n1) Get count of L\n2) Get count of R\n3) Get count of _\n4) Result will be abs(Value_Step1-Value_Step2) + Value_Step3\n\n# Complexity\n- Time complexity:\n$$O(n)$$ \n\n- Space complexity:\n$$O(1)$$ \n\n# Code\n```python3 []\nclass Solution:\n    def furthestDistanceFromOrigin(self, moves: str) -> int:\n        l = list(moves)\n        count_left = l.count(\'L\')\n        count_right =  l.count(\'R\')\n        count_blank = l.count(\'_\')\n        dist = abs(count_left-count_right) + count_blank\n        return dist\n```
['Python3']