others

「others」の編集履歴(バックアップ)一覧はこちら

others」(2014/04/10 (木) 23:21:36) の最新版変更点

追加された行は緑色になります。

削除された行は赤色になります。

-next_permutation #highlight(java){{ static boolean next_permutation(int[]as) { int n = as.length; for (int i = n - 1; i > 0; i--) { if (as[i - 1] < as[i]) { int j = n; while (as[i - 1] >= as[--j]); swap(as, i - 1, j); reverse(as, i, n); return true; } } return false; } static void swap(int[] is, int i, int j) { int t = is[i]; is[i] = is[j]; is[j] = t; } static void reverse(int[] is, int s, int t) { while (s < --t) swap(is, s++, t); } }}

表示オプション

横に並べて表示:
変化行の前後のみ表示: