MITRE Interview Question

Please describe how to implement a function to print out a linked list backwards

Interview Answers

Anonymous

Jul 15, 2009

I outlined how to accomplish this in the C programming language, just watch out for basic stuff from your first computer science classes and software systems classes.

1

Anonymous

Sep 16, 2011

iterate through the list and add the data onto a stack; then iterate through the stack and print..o(2n). alternatively you can write a recursive function that calls itself on the next element before printing its own element, but that has its own overheads.