Restore the Array From Adjacent Pairs at Robinhood

Medium75.0% acceptance

This problem has 100.0% frequency at Robinhood.

Problem Description

There is an integer array `nums` that consists of `n` **unique** elements, but you have forgotten it. However, you do remember every pair of adjacent elements in `nums`. You are given a 2D integer array `adjacentPairs` of size `n - 1` where each `adjacentPairs[i] = [ui, vi]` indicates that the elem...

Read full problem and hints

Topics

Also asked at 8 companies


More Robinhood Questions

View all Robinhood questions