Algorithms for advection and shock problems