Domanda di colloquio di Cadence Design Systems

Improve the time complexity for circular link list while inserting and deleting an element.

Risposta di colloquio

Anonimo

11 ago 2020

Make the head of circular linked list to be last node instead of first. It makes o(1) for insert/delete at start and end of circ linked list.