flipper.c
void rand_flip(int *lst) {
  int left, right;
  left = randint(0, m);

  if (frag_size == 0)
	right = randint(0, m);
  else
	right = randint(MAX(0, left - frag_size), MIN(m, left + frag_size));

  if (left > right) {
	int tmp = left;
	left = right;
	right = left;
  }

  flip(lst, left, right);
}
/* Randomly pick a segment within lst to flip in place. This segment may have a
   length of zero, in which case, nothing happens.
*/
Randomly pick a segment within lst to flip in place. This segment may have a
length of zero, in which case, nothing happens.
Randomly pick a segment within lst to flip in place . This segment may have a length of zero in which case nothing happens .
void rand_flip(int *lst) {
  int left, right;
  left = randint(0, m);
  if (frag_size == 0)
	right = randint(0, m);
  else
	right = randint(MAX(0, left - frag_size), MIN(m, left + frag_size));
  if (left > right) {
	int tmp = left;
	left = right;
	right = left;
  }
  flip(lst, left, right);
}
void rand_flip ( int * lst ) { int left , right ; left = randint ( 0 , m ) ; if ( frag_size == 0 ) right = randint ( 0 , m ) ; else right = randint ( MAX ( 0 , left - frag_size ) , MIN ( m , left + frag_size ) ) ; if ( left > right ) { int tmp = left ; left = right ; right = left ; } flip ( lst , left , right ) ; }
Randomly pick a segment within lst to flip in place.
Randomly pick a segment within lst to flip in place .