When there is no elements in the data structure, what should it return for max & min?
@wang.senyuan When no elements in the data structure, the return for both max & min is an empty string
"". I'll update the description.
@1337c0d3r The empty string is a valid key, though, isn't it? So might be cleaner to just say "don't do that" (i.e., say that max/min won't be called on an empty structure). As it's also already done in many other problems.
@StefanPochmann Yeah, it would be ambiguous if the empty string is a valid key. I have updated the description that the key is guaranteed to be a non-empty string.
@StefanPochmann It should be a no-op, although the description did not mention that explicitly. I'll update the description to mention that.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.