next up previous
Next: Operations Up: CSE 2320: Algorithms and Previous: Singly-Linked List

Operations



\psfig{figure=figures/f12-6.ps}

   Insert(L,x)
      next(x) = head(L)
      head(L) = x


   Search(L,k)
      x = head(L)
      while x <> NIL and key(x) <> k
         x = next(x)
      return(x)



Copyright © 1998 The University of Texas at Arlington