Leetcode çözümleri | Special Array I | Bit manipülasyonu
Автор: Soner Gönül
Загружено: 2025-02-04
Просмотров: 191
Leetcode içerisinde bulunan "Special Array I" sorusunun açıklaması ve çözümü. Bu soruda size verilen bir tam sayı dizisi içinde, yanyana olan sayılardan ikisinin de tek veya ikisinin de çift olup olmadığını bulmanız isteniyor.
💪 KATIL: https://www.youtube.com/sonergonul/join
➡️ Leetcode 3151. Special Array I: https://leetcode.com/problems/special...
00:00 Giriş
00:05 Problemin açıklaması
01:54 Whiteboard açıklaması
04:05 Çözümün kodlanması
05:26 Time ve Space complexity
➡️ Problem açıklaması:
An array is considered special if every pair of its adjacent elements contains two numbers with different parity.
You are given an array of integers nums. Return true if nums is a special array, otherwise, return false.
Example 1:
Input: nums = [1]
Output: true
Explanation:
There is only one element. So the answer is true.
Example 2:
Input: nums = [2,1,4]
Output: true
Explanation:
There is only two pairs: (2,1) and (1,4), and both of them contain numbers with different parity. So the answer is true.
Example 3:
Input: nums = [4,3,1,6]
Output: false
Explanation:
nums[1] and nums[2] are both odd. So the answer is false.
#leetcode #kodlama #bitmanipulation
⭐Bit manipülasyonları playlist'i⭐: • Bit Manipulation
***
💪 KATIL: https://www.youtube.com/sonergonul/join
🤖 LEETCODE ► • Leetcode
💚 HACKERRANK ► • Hackerrank
👌 HACKERRANK- 30 DAYS OF CODE ► • Hackerrank - 30 Days of Code
🎁 C# YENİLİKLERİ ► • C#
💜 SIFIRDAN C# PROGRAMLAMA EĞİTİMİ ► • Sıfırdan C# Programlama Eğitim Seti
🔆 C# SHORTS ► • Shorts
💛 CODECADEMY EĞİTİMLERİ ► • Codecademy
🎨 .NET YENİLİKLERİ ► • .NET
⭐ .NET MAUI VİDEOLARI ► • .NET MAUI
🎖️ VISUAL STUDIO VİDEOLARI ► • Visual Studio
🎉 BENCHMARKDOTNET VİDEOLARI ► • BenchmarkDotNet
✨ ALGORİTMA VİDEOLARI ► • Algoritma
🐦 Twitter'dan takip edin ► / sonergonul
🦋 Bluesky'dan takip edin ► https://bsky.app/profile/sonergonul.b...
💜 Twitch'ten takip edin ► / sonergonul
🔥 Mastadon'dan takip edin ► https://hachyderm.io/@sonergonul
💚 Discord kanalımız ► / discord
💖 Quora'dan takip edin ► https://www.quora.com/profile/Soner-G...
💛 Instagram'dan takip edin ► / sonergonul
✨ Tiktok'tan takip edin ► / soner_gonul
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: