Skip to content

Instantly share code, notes, and snippets.

@rahul4coding
Created December 16, 2019 18:31
Show Gist options
  • Save rahul4coding/67a53c26c455aed330648ccf14e8e53b to your computer and use it in GitHub Desktop.
Save rahul4coding/67a53c26c455aed330648ccf14e8e53b to your computer and use it in GitHub Desktop.
Reverse Print a given linkedList | JS
function reversePrint(head) {
//recursion is king
if(head!==null){
reversePrint(head.next);
return console.log(head.data);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment