Back to Questions

Find the Difference

145.7K viewsAsked at Stripe
Easy

Question Explain

You are given two strings $s$ and $t$. String $t$ is generated by randomly shuffling string $s$ and then adding one more letter at a random position. Find the letter that was added to $t$. Solve using XOR or frequency array.

Start Trying This Question Simulation

Practice answering orally or with text to get instant AI feedback.

Practice with This Question
Find the Difference - Interview Question