Algorithms on containers