My brain just broke
-
-
-
To be fair it is part of some generic code and the key type is a template parameter that sometimes happens to be bool. It is also constructed incorrectly.
- Još 2 druga odgovora
Novi razgovor -
-
-
Is the implementation O(log(N)) or O(N)? This is really important.
-
It's amortized O(1). Very efficient.
- Još 1 odgovor
Novi razgovor -
-
-
What's wrong with vector<bool> ? Several xmas drinks in, but I can imagine plenty of situations this would be fine...
-
vector<bool> is great but proxy references go against some people's religious beliefs.
Kraj razgovora
Novi razgovor -
-
-
Luckily C++ has zero cost abstractions, so I'm sure it's as fast as a hand coded implementation.
- Kraj razgovora
Novi razgovor -
-
-
Quick, replace that with set<bool>, a binary tree sounds like a better solution for searching the bool-space :)
-
At our scale we cannot afford log(N) operations even if N <= 2.
- Još 1 odgovor
Novi razgovor -
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.