Solving "Print the Elements of a Linked List" from Hacker Rank ( Easy ) - Problem solving in JS

Published: 29 February 2020
on channel: Rowadz
716
12

Recursive solution:
function printLinkedList(head) {
if(!head) return;
console.log(head.data);
printLinkedList(head.next);
}

I'm solving this problem in JS

https://www.hackerrank.com/challenges...

* It's just a way for me to keep solving questions... *

My Profile :

https://www.hackerrank.com/rowad


Watch video Solving "Print the Elements of a Linked List" from Hacker Rank ( Easy ) - Problem solving in JS online without registration, duration hours minute second in high quality. This video was added by user Rowadz 29 February 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 716 once and liked it 12 people.