sorted vertices; bitonic algorithm