Memory-Efficient Approximation Algorithms for M