← Expedia questions

Second and nth largest element; replace linked list nodes with next greater value

Filed under Expedia

Given the head of a singly linked list, return an array of integers where answer[i] is the value of the next greater node for the i-th node. If no strictly greater node exists later in the list, set…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Expedia questions

Collected from public candidate posts and coding forums. Updated Nov 2026.