Limit Element Occurrences in Sorted… — Coding problem | OneNoughtOne