algorithm notes