Last active
February 26, 2020 16:23
-
-
Save vicxruiz/7092b10287b10d4fde16efdf1a2e4c93 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. | |
Find all the elements of [1, n] inclusive that do not appear in this array. | |
Example: | |
Input: | |
[4,3,2,7,8,2,3,1] | |
Output: | |
[5,6] | |
func findDisappearedNumbers(_ nums: [Int]) -> [Int] { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment