Phenom interview question

Swap 2 strings without using a third variable.

Interview Answer

Anonymous

21 Oct 2025

concat the 2 strings, then use s2 = substring(0, s1.length()-s2.length()) and s1 = substring(s2.length())