Domanda di colloquio di Deutsche Bank

Basic Java Questions, some knowledge-based questions about threads - different locks classes, concurrency classes etc. which I had no idea about. Then a coding question - reverse last n nodes of a linked list.

Risposta di colloquio

Anonimo

16 mag 2015

I gave two solutions to the linked list question, first solution by iterating twice - once to find length, 2nd iteration to reverse from nth node from end of list. The second solution was using recursion. Looked like the interviewer had another solution in mind and didn't even bother to try and understand my solution. He pointed out a mistake in my solution which I proved through iteration was in fact correct. He was even telling the wrong runtime and space complexities. I am glad I won't be working here.

1