Kth Prime Number

O(N) time and O(N) space