Velotio | Rope Queries: Dynamic Interval Management | Online Test Coding Questions + Solutions | 2022

Question · Posted Apr 2026

Problem Statement: Searching Rope Queries The Scenario: You have a rope of length X. There are red spots at every meter mark along the rope, starting from index 1 to X−1. Initially, the rope is one single piece. The Queries: There are two types of queries that you must process in the given order: Type 1 Query (Cut): You are given a number N. You must cut the rope at the red spot N. This splits the piece of rope ...

The full answer & interview discussion are available to premium members.

Log in Create a free account