Write a function to find the nth smallest integer in an unsorted array.
This is a companion discussion topic for the original entry at https://www.raywenderlich.com/11447782-kotlin-whiteboard/lessons/24
Write a function to find the nth smallest integer in an unsorted array.