Advertisement
rsvaco

entregable prg tema 5A

May 23rd, 2017
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.45 KB | None | 0 0
  1. package lineales;
  2.  
  3. public class SolucionEntregableA
  4. {
  5.     public static NodoInt clonInvertido(NodoInt sec) {
  6.         if(sec.equals(null)) {
  7.             NodoInt res = new NodoInt(sec.dato);
  8.             NodoInt aux = sec;  
  9.             while(aux.siguiente != null) {
  10.                 res = new NodoInt(aux.siguiente.dato, res);
  11.                 aux = aux.siguiente;
  12.             }
  13.             return res;
  14.         }
  15.         else return null;
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement