Advertisement
Guest User

Untitled

a guest
Nov 21st, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. public SLL delete_smaller_from(int value) {
  2. SLLNode p=this.first;
  3. SLL nova=new SLL();
  4. while(p!=null){
  5. if(p.salary>-value){
  6. nova.insertLast(p.id, p.salary);
  7. }
  8. p=p.succ;
  9. }
  10. return nova;
  11. }
  12.  
  13. // public SLL sort_descending() {
  14. // SLLNode p=this.first;
  15. // SLL nova=new SLL();
  16. // while (p!=null){
  17. // if(nova.first.id<nova.first.succ.id){
  18. // SLLNode temp=nova.first;
  19. // nova.first=nova.first.succ;
  20. // nova.first.succ=temp;
  21. // }
  22. // p=this.first.succ;
  23. // }
  24. // return nova;
  25. // }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement