LeetCode Çözümlerİ – 389. Find the Difference [Google Mülakat Sorusu]

LeetCode içerisinde bulunan “Find the Difference”‘ sorusunun açıklaması ve çözümü. Bu soruda harfleri karıştırılmış olan iki string’in arasındaki tek farklı karakteri bulmanız isteniyor. LeetCode’a göre bu soru daha önce Google mülakatlarında sorulmuş sorulardan biri.

🔥 LeetCode 389. Find the Difference: https://leetcode.com/problems/find-the-difference/

➡️ Problem açıklaması:

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.


Input: s = “abcd” t = “abcde”

Output: e

Explanation: ‘e’ is the letter that was added.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.