I know the Last() method of Linq returns the last entry of a SortedDictionary in O(n) because it needs to enumerate through all the entries. What about the First() method? Is it O(1) since it's enumerating only one iteration?
I know the Last() method of Linq returns the last entry of a SortedDictionary in O(n) because it needs to enumerate through all the entries. What about the First() method? Is it O(1) since it's enumerating only one iteration?