Print linked list reverse: C++ interview with a Snap engineer

preview_player
Показать описание
Watch someone try to print a linked list in reverse technical problem in C++ with a FAANG Engineer in a mock interview.

Рекомендации по теме
Комментарии
Автор

He can use a recursive function to solve this problem.
void printReverse(Node *head){
if(head == nullptr) return;
printReverse (head->next);
cout << head->data << endl;
}

carloshsvital
Автор

STL Stack does not have iterators nor insert function!

gekk
Автор

Just read the interview feedback. Too harsh to give this attempt a "weak recommendation". The calibration is too harsh.

ohileshwaritagi
Автор

The real question is how representative is this of a real interview? Reversing a linked list seems very trivial

jimothyus
welcome to shbcf.ru