Comment on Efficiently Generating a Number in a RangeparentComments−emmanuel_12348yOr in O(1): return min Alternatively return max−dahart8yOr in O(1)You mean in one instruction? The parent comment is O(1). The methods in the article are all O(1) too.
Comments
Or in O(1):
AlternativelyYou mean in one instruction? The parent comment is O(1). The methods in the article are all O(1) too.