Find the position of an element in a Java TreeMap
Given an element N and a TreeMap, the task is to find the position of this element in the given TreeMap in Java. Examples: Input: TreeMap = {10=Geeks, 15=4, 20=Geeks, 25=Welcomes, 30=You}, N = 20 Output: 2 Input: TreeMap = {10=Geeks, 15=4, 20=Geeks, 25=Welcomes, 30=You}, N = 5 Output: -1 Approach: T