Razorpay Interview Question

They asked Basic Coding like reverse a string and swap two variables without using third variable