Google interview question

Calculate the memory saved with different codes.