/usr/sbin/blog

Alex's Geekery Journal.

This blog has been deprecated. Go here for the new /usr/sbin/blog

Permutations: An Interview Question

Here I go over a coding question I was recently asked during an interview.

You can find the source here: https://gist.github.com/2604992

Notes

  1. In some languages, prepending to a list is faster than appending. In Python it doesn’t matter.
  2. The weird characters in the Vim session are whitespace characters. $ is a newline character.

Comments