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 hintsTopics
Also asked at 8 companies
More Robinhood Questions
Ways to Split Array Into Three SubarraysMediumNumber of Orders in the BacklogMediumCount Good MealsMediumCheck if There is a Valid Path in a GridMediumCount the Number of Consistent StringsEasy
View all Robinhood questions