Indexed Vector as a Linked List with Checkpoints Every k Nodes
Company: OpenAI
Role: Software Engineer
Category: Software Engineering Fundamentals
Difficulty: hard
Interview Round: Onsite
Overview: Implement an indexed dynamic sequence of strings, in the sense of an array list, that supports inserting at a position and reading by position. Starting from a plain singly linked list, build a linked list with a checkpoint every k nodes so reads cost O(k), and keep the checkpoints correct as insertions shift positions.
Read the full OpenAI Software Engineer interview experience this question came from