Straightening MDLL to DLL

What will be the TC of this program ?? O(n) ??