Shortest Path With At Most K Consecutive Identical Characters
Find the cheapest directed route whose vertex labels never repeat the same letter more than k times in a row. Track the current run length alongside each vertex.
Find the cheapest directed route whose vertex labels never repeat the same letter more than k times in a row. Track the current run length alongside each vertex.