Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void brisiDuplikati(SLL<Integer> lista) {
- SLLNode<Integer> d1 = lista.getFirst();
- SLLNode<Integer> pom = null;
- SLLNode<Integer> temp = null;
- while (d1 != null) {
- temp = d1;
- pom = d1.succ;
- while (pom != null) {
- if (d1.element == pom.element) {
- temp.succ = pom.succ;
- } else {
- temp = pom;
- }
- pom = pom.succ;
- }
- d1 = d1.succ;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement