Find the Difference | LeetCode 389 | Explained 3 Approaches

preview_player
Показать описание
In this tutorial, I have explained three approaches to solve Find the Difference LeetCode problem.

Given two strings s and t which consist of only lowercase letters.

String t is generated by random shuffling string s and then add one more letter at a random position.

Find the letter that was added in t.

Рекомендации по теме
Комментарии
Автор

This is a very informative video, thanks for making!

steamcode
Автор

Hi sir,
Can't we use 2 Set<Character>

Then their intersection.it will give only the common elements. The extra char will be found from set 2?

Can you tell me is it the good approach?
Apologies, if I did wrong

wish
Автор

For method 2 & 3, will it work if chars are in different order like s = abcd, t= acdbe?

naveenkumar-vqpz
Автор

Where is the link to the original problem??

monkeytrollhunter
join shbcf.ru