Skip to content

Instantly share code, notes, and snippets.

@kozross
Created February 27, 2017 06:46
Show Gist options
  • Save kozross/7c9d7d2540a700b234e2969a7287e08e to your computer and use it in GitHub Desktop.
Save kozross/7c9d7d2540a700b234e2969a7287e08e to your computer and use it in GitHub Desktop.
const lookup_table = sparse(vcat(collect.(repeated.(1:9, binomial.(8, 0:8)))...),
vcat(map(x -> collect(1:x), binomial.(8, 0:8))...),
vcat(collect.(Permutations.(0:8))...)) #Permutations is a custom iterator I define earlier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment