For subMap()
, the time complexity is O(log n + m) where m is the number of entries needed to return for the submap.
See https://algs4.cs.princeton.edu/code/javadoc/edu/princeton/cs/algs4/RedBlackBST.html#size(Key,Key)
The keys methods take O(log n + m) time, where m is the number of keys returned by the iterator.