python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Unordered map of unordered set in C++ 11
I wanted to implement something, that maps an unordered set of integers to an integer value. Some kind of C++ equivalent of Python dict, which has sets as keys and ints as values.
So far I used std::m...
Vojtooo
Votes: 0
Answers: 2
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, h...
George An
Votes: 0
Answers: 0
use unordered_set<T> or unordered_set<T*>?
If we use unordered_set<T> (T is custom type, not simple type), it's quite likely that we need define custom operator== and hasher, which is kind of cumbersome if we have lots of different T in...
Lewis Chan
Votes: 0
Answers: 0
How can I optimize this function to find statistical mode in vector-like container with billions of elements
I have a very slow and hefty function to find statistical mode (including multiple modes) which is working but unusably slow.
The requirements are as follows.
Must take an std::vector-like container ...
dave_thenerd
Votes: 0
Answers: 1