Linked Sorted List

  • List implemented with linked node structure rather than arrays.

Issues

  • Find proper position for the new element in the sorted list using two pointers predLoc and location, where predLoc trails behind location.

  • Obtain a node for insertion and place item in it.

  • Insert the node by adjusting pointers.

  • Increment length.

Example Trace.... INSERT 'S'

Next

© Lynne Grewe