SergeyKasmy / think-cell-interval-map

think-cell recruitement task: interval map

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is my take (or two, actually, check the take_one and take_two tags) at the think-cell recruitement/pre-interview task. Unfortunately they had very opaque requirements, didn't let me see the tests they checked my code against, and just let me fail 2 times before just saying "well, you tried... Bye!". The fact that they couldn't even express their requirements properly and had such an attitude to people who waste their actual time to take that test is just plain cruel.

The task was to create a generic interval map of values, storing only the beginning of the interval/range, using just one operation of logarithmic complexity, with no duplicate adjacent values, without requiring the key and value types to have a copy constructor, and having only operator< on keys, and operator== on values. Alas, they forgot to mention anything else, including but not limited to: what happens to the old value if the range you are inserting partially overlaps with it; what value should the end of the map contain, i.e. the start value or the last value (the start value is specified manually in the map), etc. Oh well, we all forget these small things from time to time, right? We are all humans after all. Who cares if people waste almost their entire day on it? It's their issue and it's completely their fault they are trying to find a job to survive and maybe even contribute to the society. Dummy-dum-dum humans...

About

think-cell recruitement task: interval map


Languages

Language:C++ 100.0%