We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
This comment will probably get burried, but basically...if i understood this correctly, the last one who calls and enters the if (head != null) get's to do the print statement first.
Then it unravells until the first one who called the if statements get's their turn to print it out.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Print in Reverse
You are viewing a single comment's thread. Return to all comments →
This comment will probably get burried, but basically...if i understood this correctly, the last one who calls and enters the if (head != null) get's to do the print statement first.
Then it unravells until the first one who called the if statements get's their turn to print it out.