Algorithm notes