Re:Pearl No. 4 – Kth Smallest in the Union of Two Sorted Col...
by jacksontale on Friday October 20, 2017 @04:19AM
(#15514282)
Sorry for the confusion. You are absolutely right. I just copy/paste the original problem statement in the book.
Will change
Ordered collection != sorted collection, btw. Sorted collections are actually more like sets than like arrays. A data structure that stores the elements in a sorted fashion is actually able to store an unordered collection with naturally defined insertion / deletion operations. (In OCaml, Set data structure is represented as a balanced binary tree, for instance, and it requires an order relation defined for its elements.)