📌📌 Well-Coded || Clean & Concise || 93% faster 🐍
Implementation:\n\'\'\'\n\n\tclass Solution:\n    def minimumDistance(self, word: str) -> int:\n        def dist(pre,cur):\n            if pre==None:\n         
## Implementation:\n\'\'\'\n\n\tclass Solution:\n    def minimumDistance(self, word: str) -> int:\n        def dist(pre,cur):\n            if pre==None:\n                return 0\n            x1,y1 = divmod(ord(pre)-ord(\'A\'),6)\n            x2,y2 = divmod(ord(cur)-ord(\'A\'),6)\n            return abs(x1-x2) + abs(y1-y2)\n        \n        @lru_cache(None)\n        def fingers(i,l,r):\n            if i == len(word):\n                return 0\n            n1 = dist(l,word[i]) + fingers(i+1,word[i],r)\n            n2 = dist(r,word[i]) + fingers(i+1,l,word[i])\n            return min(n1,n2)\n        \n        return fingers(0,None,None)\n\n**feel free to ask if you need Explaination. \uD83E\uDD17**\n### Thanks and Upvote If like the Idea !!\uD83E\uDD1E
['Dynamic Programming', 'Python', 'Python3']