Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public SLL delete_smaller_from(int value) {
- SLLNode p=this.first;
- SLL nova=new SLL();
- while(p!=null){
- if(p.salary>-value){
- nova.insertLast(p.id, p.salary);
- }
- p=p.succ;
- }
- return nova;
- }
- // public SLL sort_descending() {
- // SLLNode p=this.first;
- // SLL nova=new SLL();
- // while (p!=null){
- // if(nova.first.id<nova.first.succ.id){
- // SLLNode temp=nova.first;
- // nova.first=nova.first.succ;
- // nova.first.succ=temp;
- // }
- // p=this.first.succ;
- // }
- // return nova;
- // }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement