Razorpay Interview Question

Remove Consecutive Duplicate Pairs from String