2 ms·
consider an even simpler example of wanting an array that contains no duplicates and is sorted. i can write the logic for that in 5 minutes, but it will be both
by japanac 10y ago
consider an even simpler example of wanting an array that contains no duplicates and is sorted. i can write the logic for that in 5 minutes, but it will be bother memory and cpu inefficient. i would spend another 20 minutes optimizing that logic. by the time i'm done with that, i've forgotten why i needed that in the first place. importing gods' treeset would have been a lot easier, since it solves that problem.