#3731

Find Missing Elements

newbie · 155 · lc easy +14 · 82.9% accepted · 72 likes · top 94%

Description

Given an array nums of unique integers that originally contained every integer in some contiguous range (with the range's endpoints still present), return a sorted list of all integers missing from that range, or an empty list if none are missing.

Code

1
2
3