add linearsearch, and toposort algorithm