LTIMindtree interview question

Compress function and trim function differences