1 year ago

#369834

test-img

George An

How do you find an element strictly less than integer c in an unordered_set without looping through the whole thing

I have an unordered_set of integers and I want to see if there is an element strictly less than an integer c that exists. I want to use unordered_set::find but since I'm not finding a single number, how am I able to do this. I could iterate through the entire set but that would take too long. Any help would be appreciated.

c++

unordered-set

0 Answers

Your Answer

Accepted video resources