Numbers with No Neighbors
CodingPhone ScreenSoftware EngineerReported Nov, 2025
Examples
Example 1:
Input: nums = [1, 3, 5, 7]
Output: [1, 3, 5, 7]
Explanation:
Example 2:
Input: nums = [1, 2, 5, 7]
Output: [5, 7]
Explanation:
Example 3:
Input: nums = [4, 4, 7, 9]
Output: [7, 9]
Explanation: