© 2026 LinearBytes Inc.
Search posts, tags, users, and pages
Mev-Rael
Executive Product Leader & Mentor for High-End Influencers and Brands @ mevrael.com
If you would be able to define your question from the data structure and algorithm point of view Google could help you.
What you have is called a circular linked list.
Problem you have originally was defined as a "petrol pumps problem/algorithm".