Back to problems

Text Editor String Operations: Insert, Delete, Get Character

Algorithm · Geico · Easy

Implement a text-editor feature that maintains a string and supports the following operations: insert(idx, char): Place the single-letter character char at position idx. delete(start_idx, end_idx): Remove the characters beginning at start_idx and continuing up to, but not including, end_idx. get(idx): Return the character currently stored at position idx. All supplied indices are valid, and every inserted character is a single letter. Function Specification Implement…

Loading the rest of the question…