Which is the Most Underrated Data Structure you know and reason for that.
This will help us to learn that and will help in future.
# | User | Rating |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3773 |
3 | Radewoosh | 3646 |
4 | ecnerwala | 3624 |
5 | jqdai0815 | 3620 |
5 | Benq | 3620 |
7 | orzdevinwang | 3612 |
8 | Geothermal | 3569 |
8 | cnnfls_csy | 3569 |
10 | gyh20 | 3447 |
# | User | Contrib. |
---|---|---|
1 | cry | 161 |
2 | Um_nik | 160 |
2 | maomao90 | 160 |
4 | awoo | 159 |
5 | atcoder_official | 157 |
6 | -is-this-fft- | 156 |
7 | nor | 155 |
7 | adamant | 155 |
9 | maroonrk | 152 |
10 | Dominater069 | 148 |
Which is the Most Underrated Data Structure you know and reason for that.
This will help us to learn that and will help in future.
Name |
---|
linked list for sure. Reason : don't know
it's not underrated, it's just useless.
Everything has its uses, for example linked lists are quite nice for stuff like euler circles, and also linked list is very simple and cool to implement on your own
Just use treap like normal people
>like normal people
>said pupil
barbarian_clash_of_clans
Then implement LRU cache without linked list in O(1) complexity
Solution
is the time complexity the same as Linkedlist solution?
While they are not super useful, I would definitely agree that they are underrated.
One nice trick is to combine them with maps to iterators
std::map<T, std::list<T>::iterator>
, in this way you can get benefits of both map and list. Example: 110657402 (although I don't understand this solution anymore so I am not sure whether that was really necessary).bfs with list is delicious
A single integer
Top tier shitpost lol
Umm..stack and deque. They can be pretty useful sometimes!
set with custom comparator
the rope. It does string operations in O(logN) time complexity and I think it can be very useful sometimes
it's actually very useful, but sadly Splay Tree does almost everything it can do :(
its actually just a splay tree/rb tree/skip list/any dynamic O(logN) data structure with strings in fact
one advantage) rope can be used like this:
unordered_map
and reason is it cause TLE due to collision problems .I'd say maps but everyone uses maps xd
STL
std::list<..>
, it's sometime useful when we need insertions and deletions in O(1).Cartesian tree
bitset
Sadly ,Only remembered during Desperate times.
The best data structure indeed.
Trie
Maps. They are the best