alextoledoglez / PermMissingElem

Find the missing element in a given permutation.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PermMissingElem

Find the missing element in a given permutation.

Input / Output

  • [] -> 1
  • [1, 2] -> 3
  • [2, 1, 3] -> 4
  • [2, 3, 1, 5] -> 4
  • [2, 3, 4, 5, 6] -> 1
  • [4, 2, 3, 5, 1, 6, 8, 9] -> 7

About

Find the missing element in a given permutation.


Languages

Language:Kotlin 100.0%