Restore the Array From Adjacent Pairs at eBay
Medium75.0% acceptance
This problem has 62.5% frequency at eBay.
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 eBay Questions
LRU CacheMediumRemove One Element to Make the Array Strictly IncreasingEasyPartition Equal Subset SumMediumSubtree of Another TreeEasyMinimize Maximum Pair Sum in ArrayMedium
View all eBay questions