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.
i was thinking if i can solve it through recursion and ended up concluding may be i can't because i have to somehow need a variable which holds positionfromlast value of each node and i can't embbed that info in return value since return has diff purpose in this question.
I actually giggled when i saw that you destroyed who list to return just one value :D
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Get Node Value
You are viewing a single comment's thread. Return to all comments →
i was thinking if i can solve it through recursion and ended up concluding may be i can't because i have to somehow need a variable which holds positionfromlast value of each node and i can't embbed that info in return value since return has diff purpose in this question.
I actually giggled when i saw that you destroyed who list to return just one value :D