Advertisement
Guest User

Untitled

a guest
Feb 8th, 2016
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. public static int LOCATE(int p, List L)
  2. {
  3. int i = 0;
  4. while (L.returnValueAtIndex(i) != p)
  5. {
  6. i++;
  7. }
  8. return i;
  9. }
  10.  
  11. public static int PREVIOUS(int p, List L)
  12. {
  13. return p - 1;
  14. }
  15.  
  16. public static void MAKENULL(List L)
  17. {
  18. L.FirstEmpty = 0;
  19. }
  20.  
  21. public static void DELETE(int p, List L)
  22. {
  23.  
  24. while (p <= END(L))
  25. {
  26. L.setValueAtIndex(L.returnValueAtIndex(NEXT(p, L)), p);
  27. p++;
  28. }
  29. L.FirstEmpty = END(L) - 1;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement