Skip to content

Latest commit

 

History

History

missingnumbers

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Missing Numbers

Given an array containing all the numbers from 1 to n except two, find the two missing numbers.

Example

  • missing([]int{4, 2, 3}) = []int{1, 5}
  • missing([]int{1, 2, 3, 4}) = []int{5, 6}

Run tests with benchmarks

go test -bench .