daily:2021-06-16
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| daily:2021-06-16 [2021/06/16 19:12] – created chrisbolas | daily:2021-06-16 [2021/06/16 21:13] (current) – [Heap] chrisbolas | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| ===== Heap ===== | ===== Heap ===== | ||
| + | [[https:// | ||
| + | |||
| + | [[https:// | ||
| + | < | ||
| + | def check_pegs(guesses, | ||
| + | hints = Array.new(4) | ||
| + | guesses.each_with_index do | g, i | | ||
| + | hints[i] = ' | ||
| + | secrets.each_with_index do | s, j | | ||
| + | hints[j] = ' | ||
| + | end | ||
| + | end | ||
| + | peg_count(hints) | ||
| + | end | ||
| + | </ | ||
| + | |||
| + | However this can be confusing as a standard && operator would set the value then next/break only if the statement after the if was | ||
| + | |||
| + | [[https:// | ||
| + | |||
| + | [[https:// | ||
| + | |||
| + | [[https:// | ||
| + | |||
| + | [[https:// | ||
| + | |||
| + | [[https:// | ||
daily/2021-06-16.1623870722.txt.gz · Last modified: 2021/06/16 19:12 by chrisbolas
