Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void insertFirst(List &L, address P) {
- Q = first(L);
- while ( next(Q) != first (L) ){
- Q = next(Q);
- }
- next(Q) = P;
- next(P) = first(L);
- prev(P) = Q;
- prev(Q) = P;
- first(L) = P;
- }
Advertisement
Add Comment
Please, Sign In to add comment