Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package lineales;
- public class SolucionEntregableA
- {
- public static NodoInt clonInvertido(NodoInt sec) {
- if(sec.equals(null)) {
- NodoInt res = new NodoInt(sec.dato);
- NodoInt aux = sec;
- while(aux.siguiente != null) {
- res = new NodoInt(aux.siguiente.dato, res);
- aux = aux.siguiente;
- }
- return res;
- }
- else return null;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement