Memory-EfficientApproximationAlgorithmsfor MAX-K-CUTandCorrelationClustering