• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Computer question that's been bugging me...

JonTheBaller

Golden Member
Write a function that returns the nth element from the right in a singly-linked, forward-linked linked list. And no you can't go to the end, count the size, and start over. Basically you can traverse once through but you can't start over at the first node. I think I know how to do this recursively, but how would you do it in a while loop?
 
Back
Top