← back to unit
Medium
# queues medium
The Story Circle
The circle builds a story one word each: say your word, walk to the back, next kid continues. Who says the k-th word? 📖
You get the names and the word number k. Print the kid who says word k.
Example:
Input: names = ["mia", "leo", "kai"], k = 7
Output: mia
Cycling through 3 names, word 7 lands on position (7 - 1) % 3 = 0 — mia.
💡 need a hint?
q-story-circle.py🔒 given lines are locked — write your code in between
loading...