Guest User

Untitled

a guest
Dec 7th, 2014
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. /*C++*/
  2. /* Otherwise, bring this row up to the slot for the next free row. */
  3. std::swap_ranges(toggle.row_begin(pivotRow), toggle.row_end(pivotRow),
  4. toggle.row_begin(nextFreeRow));
  5.  
  6. /* Also, exchange the corresponding entries in the puzzle vector. */
  7. std::swap(puzzle[pivotRow], puzzle[nextFreeRow]);
  8.  
  9. #Python
  10. toggle[pivotRow], toggle[nextFreeRow] = toggle[nextFreeRow], toggle[pivotRow]
  11. puzzle[pivotRow], puzzle[nextFreeRow] = puzzle[nextFreeRow], puzzle[pivotRow]
Advertisement
Add Comment
Please, Sign In to add comment