I looked through the Spark Developer Certification Study Guide and decided to try one of the sample questions.
And I was wondering why my answer on the question #6 does not match to the right answer. Perhaps there is a mistake and the correct answer is C but D as it says at the end of the section ?
Here is my source code for checking
val country = sc.parallelize(List(
("France", 15), ("Italy", 10), ("Switz", 2)
val low = country.map(x => (x._2, x._1)).sortByKey().first()
And it gives ("Switz", 2)
Link to the guide