Your Computer Science Resource

Posts Tagged ‘doubly linked list’

Dec
28th

Doubly Linked List – Delete Middle Without Counting

The middle of a list is one record with equal number of records to the left and right (assuming the list has odd number of elements). If this number is even, the middle consists of two records. Write a pseudo-code procedure to delete the middle (one or two) record(s) of a doubly linked list without counting first or knowing the total number of elements in the list.

(more…)