src/core/PriorityQueue.js
function swap(arr, i1, i2) {
  const tmp = arr[i1];
  arr[i1] = arr[i2];
  arr[i2] = tmp;
}
function swap(arr, i1, i2) {
  const tmp = arr[i1];
  arr[i1] = arr[i2];
  arr[i2] = tmp;
}
function swap ( arr , i1 , i2 ) { const tmp = arr [ i1 ] ; arr [ i1 ] = arr [ i2 ] ; arr [ i2 ] = tmp ; }
works by reference
works by reference