shlogg · Early preview
Md Ariful Haque @mah-shamim

Minimum Steps To Spell Keyword In Circular Ring

Solve "Freedom Trail" problem: find min steps to spell keyword in circular ring of characters using dynamic programming and breadth-first search.

514. Freedom Trail
Difficulty: Hard
Topics: Array, Dynamic Programming, Depth-First Search, Breadth-First Search
In the video game Fallout 4, the quest "Road to Freedom" requires players to reach a metal dial called the "Freedom Trail Ring" and use the dial to spell a specific keyword to open the door.
Given a string ring that represents the code engraved on the outer ring and another string key that represents the keyword that needs to be spelled, return the minimum number of steps to spell all the characters in the keyword.
Initially, the first character of the ring is aligned at the "12:00"...