Commit graph

8 commits

Author SHA1 Message Date
Bruno BELANYI 2004cd06cf Fix edge-case in identify 'end' upper-bound
All checks were successful
ci/woodpecker/push/check Pipeline was successful
Just my luck, this was found immediately in the CI, right when I
uploaded the project thinking I was done.

Thankfully the fix is easy and (in hindsight) quite obvious.
2024-08-24 21:01:31 +01:00
Bruno BELANYI 3305b13936 Fix Meson install 2024-08-24 21:01:31 +01:00
Bruno BELANYI 08f2364c50 Make implementation follow assignment rules
From what I could find, the rules of the assignment seem to be:

1. Restrict oneself to at most *one* O(log(N)) call, and otherwise use
   constant time operations on the map.
2. Don't use more operations than strictly necessary on `K` and `V`.
3. Prefer simplicity to performance.

I think my solution would fare well under those constraints.
2024-08-24 21:01:31 +01:00
Bruno BELANYI 4ab8dd37ff Add implementation 2024-08-24 20:32:14 +01:00
Bruno BELANYI 73c2b21b94 Explicitly test for canonicity
This will come in handy later, with more complex test cases.
2024-08-24 20:32:02 +01:00
Bruno BELANYI c8183d99a6 Handle empty range insertion 2024-08-24 20:32:02 +01:00
Bruno BELANYI 3c0ddf3021 Add given code 2024-08-24 20:32:02 +01:00
Bruno BELANYI c4d81c4e81 Bootstrap project 2024-08-24 20:32:02 +01:00