Skip to content

Instantly share code, notes, and snippets.

@eungju
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eungju/e655b525f1ea880830ba to your computer and use it in GitHub Desktop.
Save eungju/e655b525f1ea880830ba to your computer and use it in GitHub Desktop.
Minimum sum of two numbers
natural-sort [ zero? ] partition dup length 2 < [ 2drop -1 ] [ 2 cut swapd 3append zip-index [ second even? ] partition [ keys 0 [ swap 10 * + ] reduce ] bi@ + ] if
natural-sort [ zero? ] partition dup length 2 < [ 2drop -1 ] [ 2 cut surround zip-index [ second even? ] partition [ keys 0 [ swap 10 * + ] reduce ] bi@ + ] if
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment