I was trying this problem CSES 1084.
I greedily choose the lowest sized valid apartment for every applicant (sorted both lists ascendingly).
But it turns out to be a wrong approach.
Why my approach is wrong?
why is my greedy choice wrong? CSES 1084 — Apartments
I was trying this problem CSES 1084.
I greedily choose the lowest sized valid apartment for every applicant (sorted both lists ascendingly).
But it turns out to be a wrong approach.
Why my approach is wrong?