some common algorithm problems