Well, the problem is that I have a bunch of timeseries data and I need to find the first data point before a specific moment in time. Are you sure that I need a HashMap?
Sure. That's the underlying structure in both C++'s std::map and Java's TreeMap. They're super useful for dealing with timeseries data--especially when you have data coming from sources that may not give you the data already ordered for you or when you need to combine data from a bunch of sources.
View all comments
3
u/SignoreBanana 1d ago
Yeeeeup.
A while back I realized the solution to like 90% of DSA problems is insert sorting, bisecting, mapping, reducing, or some combination thereof.