Загрузка...

Leetcode çözümleri | Set Mismatch

Leetcode içerisinde bulunan "Set Mismatch" sorusunun açıklaması ve çözümü. Bu soruda size bir dizi veriliyor ve bu dizi içerisinde 1'den n'e kadar olan sayılardan biri çıkartılıp başka bir sayının kendisi ekleniyor ve bu iki sayıyı bulmanız isteniyor.

💪 KATIL: https://www.youtube.com/sonergonul/join

➡️ Leetcode 645. Set Mismatch: https://leetcode.com/problems/set-mismatch/description/

00:00 Giriş
00:05 Problemin açıklaması
01:36 Whiteboard açıklaması
03:39 Çözümün kodlanması

➡️ Problem açıklaması:

You have a set of integers s, which originally contains all the numbers from 1 to n. Unfortunately, due to some error, one of the numbers in s got duplicated to another number in the set, which results in repetition of one number and loss of another number.

You are given an integer array nums representing the data status of this set after the error.

Find the number that occurs twice and the number that is missing and return them in the form of an array.

Example 1:

Input: nums = [1,2,2,4]
Output: [2,3]

Example 2:

Input: nums = [1,1]
Output: [1,2]

#leetcode #programlama #yazılım

***

🤖 LEETCODE ► https://www.youtube.com/playlist?list=PL7rvg7Sao02shXDj-yaczfZFnAF_EH_CO
💚 HACKERRANK ► https://www.youtube.com/playlist?list=PL7rvg7Sao02u0PYyUHT6ItQYZFua4ilDa
👌 HACKERRANK- 30 DAYS OF CODE ► https://www.youtube.com/playlist?list=PL7rvg7Sao02s2niCrdzsPEB9qzGXpIfic
🎁 C# YENİLİKLERİ ► https://www.youtube.com/playlist?list=PL7rvg7Sao02t3bq68IjUYQIJjGrCC4x_I
💜 SIFIRDAN C# PROGRAMLAMA EĞİTİMİ ► https://www.youtube.com/playlist?list=PL7rvg7Sao02tAU3waXR3yHJP5xXQJOQg7
🔆 C# SHORTS ► https://www.youtube.com/playlist?list=PL7rvg7Sao02udZJq0X8uN4iYFoMh_Wu-O
💛 CODECADEMY EĞİTİMLERİ ► https://www.youtube.com/playlist?list=PL7rvg7Sao02uGMavl-Mnu_LPVAWsYVmov
🎨 .NET YENİLİKLERİ ► https://www.youtube.com/playlist?list=PL7rvg7Sao02seXLs_OXXo3vuGeJDoMwAE
⭐ .NET MAUI VİDEOLARI ► https://www.youtube.com/playlist?list=PL7rvg7Sao02sejh8YACKhr-vvigoNXmCF
🎖️ VISUAL STUDIO VİDEOLARI ► https://www.youtube.com/playlist?list=PL7rvg7Sao02s06i0_oceNQDCuE7qbZNmR
🎉 BENCHMARKDOTNET VİDEOLARI ► https://www.youtube.com/playlist?list=PL7rvg7Sao02tnVUKp6ZhW34mV3EIIShIQ
✨ ALGORİTMA VİDEOLARI ► https://www.youtube.com/playlist?list=PL7rvg7Sao02ue_QyrgO6-qdVDJeDUiAdd

🐦 Twitter'dan takip edin ► https://twitter.com/sonergonul
💜 Twitch'ten takip edin ► https://www.twitch.tv/sonergonul
💚 Discord kanalımız ► https://discord.gg/VXZQH3U
💖 Quora'dan takip edin ► https://www.quora.com/profile/Soner-Gonul
💛 Instagram'dan takip edin ► https://www.instagram.com/sonergonul/
✨ Tiktok'tan takip edin ►https://www.tiktok.com/@soner_gonul

Видео Leetcode çözümleri | Set Mismatch канала Soner Gönül
Яндекс.Метрика

На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.

Об использовании CookiesПринять