Skip to content

Instantly share code, notes, and snippets.

@jeffomatic
Created August 22, 2012 03:10

Revisions

  1. jeffomatic created this gist Aug 22, 2012.
    18 changes: 18 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    values: [3, 0, 2, 3, 0, 5, 7, 9, 7, 4, 4, 4, 4, 6, 8, 3, 6, 6, 3,
    9, 3, 9, 1, 6, 7, 7, 3, 1, 7, 4, 7, 9, 8, 8, 6, 6, 0, 0, 3, 6, 1,
    1, 0, 5, 3, 9, 5, 8, 4, 1, 0, 7, 9, 1, 6, 4, 0, 8, 8, 9, 7, 2, 9,
    5, 8]
    ⌜·············3·⌝
    ⌜0···········⌝ ⌜3············⌝
    0 ⌜·····2⌝ 3 ⌜·····5············⌝
    ⌜···1·⌝ 2 ⌜4·⌝ ⌜7·············⌝
    ⌜0·⌝ ⌜1·⌝ ⌜···4 ⌜4·⌝ ⌜······7 ⌜······9·⌝
    0 ⌜0⌝ 1 ⌜1⌝ ⌜3·⌝ 4 ⌜4⌝ ⌜6·⌝ ⌜····8·⌝ ⌜9·⌝
    0 0 1 1 3 ⌜3⌝ 4 4 ⌜·6 ⌜6·⌝ ⌜7·⌝ ⌜8·⌝ 9 ⌜9·⌝
    3 3 ⌜5⌝ 6 ⌜6⌝ 7 ⌜7⌝ 8 ⌜8⌝ 9 ⌜9⌝
    5 5 6 6⌝ 7 7⌝ 8 8⌝ 9 9
    6 7 8
    sorted: [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 3, 3,
    3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6,
    6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9,
    9, 9]