rornoanparn

Untitled

Feb 26th, 2020
542
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.19 KB | None | 0 0
  1. void insertLast(List &L, address P){
  2.     Q = first(L);
  3.     while ( next(Q) != first(L) ) {
  4.         Q = next (Q);
  5.     }
  6.     next (Q) = P;
  7.     prev (P) = Q;
  8.     next (P) = first (L);
  9.     prev (first(L)) = P;
  10. }
Advertisement
Add Comment
Please, Sign In to add comment