Write a function called kthGreatest that accepts an integer array a, the size of array N and an integer k as its parameters and returns the kth greatest element.
(PLEASE DO NOT UPDATE THE OUTSIDE OF THE COMMENTS)

Main function is already implemented for you, DO NOT CHANGE ANYTHING IN IT. You will just implement the function definition above the main function.

Assumptions:
N will be larger than or equal to k and k will not be equal to 0.
N will not be greater than 50.

Hint:
You may want to sort the array first.

Examples:
INPUT OUTPUT
5 2
2 8 4 5 3
5
8 1
74 85 20 100 99 86 53 4
100
2 2
3 5
3


Important issues about all exams/projects/quizzes: