Pergunta de entrevista da empresa MITRE

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

Respostas da entrevista

Sigiloso

15 de jul. de 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

Sigiloso

16 de set. de 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.