Frage im Vorstellungsgespräch bei Fresher

Revser string without using exta space

Antwort im Vorstellungsgespräch

Anonym

18. März 2022

Store start index in low and end index in high. Here, without creating a temp variable to swap characters, we use xor(^). Traverse the input string “s”. Swap from first variable to end using xor. ... Return the final output string.