Skip to main content
3 events
when toggle format what by license comment
Aug 16, 2015 at 16:15 comment added coderodde ..., where \$k\$ is the number of distinct keys, not \$\max a_i - \min a_i\$.
Aug 15, 2015 at 9:09 comment added coderodde No. Even better. I believe this is \$\mathcal{O}(n \log k)\$.
Aug 15, 2015 at 4:08 history answered JS1 CC BY-SA 3.0