4 ms·Sort desc first then it is pretty easy and can be stored as a bitmask.by literallyaduck 5y agoSort desc first then it is pretty easy and can be stored as a bitmask.