← Google questions
Low-Level DesignReported in a candidate post, Sep 2024

Implement a rope (cord) data structure with length and substring queries

Filed under Google

Design and implement a rope (cord): a binary tree whose leaves hold string fragments and whose internal nodes store the length of their left subtree. Support length, character access and substring(i…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Google questions

Collected from public candidate posts and coding forums. Updated Nov 2026.