Anybody knows how to print single-linked list in reverse order (one pass and a fixed and independent of the number of elements RAM).
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
My answer. There is no answer that solves this to your specs. It can’t be multi-pass, it cant be recursive (which I think is considered single), it has to be constant memory…
I dont think you will discover a solution, and the people who said you could do it obviously have some form of a trick aspect to the question. They aren’t obviously using the same set of definitions that this community is using.