O(nlogk) pip implementation
Merge pull request #1 from intelie/feature/nlogk-pip

O(nlogk) pip implementation