Some code snippets of Princeton's Algorithms Part I course on Coursera