ExPipeSort


code


int n = 90;
PipelineArray array[n];

con i = 1 to n do
  array(i)
end

array(i) {
  int v;
  while (input is available) do
    receive val from left;
    if (v is undefined) v = val;
    else if (val < v) send v to right;
    else send val to right; val = v;
  end
}

java source code