Problems with tag O(nlogk)