Tag Archives: microsoft mülakat sorusu

Microsoft Mülakat Sorusu | Insertion Sort List

Leetcode içerisinde bulunan “Insertion Sort List” sorusunun açıklaması ve çözümü. Bu soruda size verilen linked list içerisindeki node’ları insertion sort kullanarak sıralamanız isteniyor.

➡️ Leetcode 147. Insertion Sort List: https://leetcode.com/problems/insertion-sort-list/

➡️ Problem açıklaması:

Given the head of a singly linked list, sort the list using insertion sort, and return the sorted list’s head. The steps of the insertion sort algorithm:

– Insertion sort iterates, consuming one input element each repetition and growing a sorted output list.

– At each iteration, insertion sort removes one element from the input data, finds the location it belongs within the sorted list and inserts it there.

– It repeats until no input elements remain.

The following is a graphical example of the insertion sort algorithm. The partially sorted list (black) initially contains only the first element in the list. One element (red) is removed from the input data and inserted in-place into the sorted list with each iteration.

Example 1:

Input: head = [4,2,1,3]

Output: [1,2,3,4]

Example 2:

Input: head = [-1,5,3,4,0]

Output: [-1,0,3,4,5]

Constraints:

The number of nodes in the list is in the range [1, 5000].

-5000 <= Node.val <= 5000

Microsoft Mülakat Sorusu – Count Negative Numbers in a Sorted Matrix

LeetCode içerisinde bulunan “Count Negative Numbers in a Sorted Matrix” sorusunun açıklaması ve çözümü. Bu soruda size verilen bir matrix içerisinde kaç adet negatif sayı olduğunu efektif bir şekilde bulmanız isteniyor.

► LeetCode 1351. Count Negative Numbers in a Sorted Matrix: https://leetcode.com/problems/count-negative-numbers-in-a-sorted-matrix/

► Problem açıklaması:

Given a m x n matrix grid which is sorted in non-increasing order both row-wise and column-wise, return the number of negative numbers in grid.

Example 1:

Input: grid = [[4,3,2,-1],[3,2,1,-1],[1,1,-1,-2],[-1,-1,-2,-3]]

Output: 8

Explanation: There are 8 negatives number in the matrix.

Example 2:

Input: grid = [[3,2],[1,0]]

Output: 0

Example 3:

Input: grid = [[1,-1],[-1,-1]]

Output: 3

Example 4:

Input: grid = [[-1]]

Output: 1

Microsoft & Amazon Mülakat Sorusu – Merge Two Sorted Lists

LeetCode içerisinde bulunan “Merge Two Sorted Lists” sorusunun açıklaması ve çözümü. Bu soruda size sıralı olarak verilen iki tane linked list‘i birleştirip yine sıralı olarak döndürmeniz isteniyor.

► LeetCode 21. Merge Two Sorted Lists: https://leetcode.com/problems/merge-two-sorted-lists/

► Problem açıklaması:

Merge two sorted linked lists and return it as a sorted list. The list should be made by splicing together the nodes of the first two lists.

Example 1:

Input: l1 = [1,2,4], l2 = [1,3,4]

Output: [1,1,2,3,4,4]

Example 2:

Input: l1 = [], l2 = []

Output: []

Example 3:

Input: l1 = [], l2 = [0]

Output: [0]

Constraints:

The number of nodes in both lists is in the range [0, 50].

-100 <= Node.val <= 100

Both l1 and l2 are sorted in non-decreasing order.

Microsoft Mülakat Sorusu – Valid Parentheses

LeetCode içerisinde bulunan “Valid Parentheses” sorusunun açıklaması ve çözümü. Bu soruda sizi verilen bir string içerisindeki parantezlerin valid (açılan parantezin önce kapatılması ve bunların sırayla olması) olup olmadığını kontrol etmeniz isteniyor.

► LeetCode 20. Valid Parentheses: https://leetcode.com/problems/valid-parentheses/

► Problem açıklaması:

Given a string s containing just the characters ‘(‘, ‘)’, ‘{‘, ‘}’, ‘[‘ and ‘]’, determine if the input string is valid.

An input string is valid if:

Open brackets must be closed by the same type of brackets.

Open brackets must be closed in the correct order.

Example 1:

Input: s = “()”

Output: true

Example 2:

Input: s = “()[]{}”

Output: true

Example 3:

Input: s = “(]”

Output: false

Example 4:

Input: s = “([)]”

Output: false

Example 5:

Input: s = “{[]}”

Output: true

Constraints:

1 <= s.length <= 10^4

s consists of parentheses only ‘()[]{}’.

Yazılımcılara Kİtap Önerİlerİ – Fuji Dağını Nasıl Taşırsınız?

Bu videoda yazılım geliştiricilere önerebileceğim kitap William Poundstone’un Odtü Yayınevi’nden çıkan “Fuji Dağını Nasıl Taşırsınız?”. Kitap temel olarak, size sorulan aldatıcı veya bulmacalı sorulara nasıl yaklaşım göstermeniz gerektiğine dair bilgiler veriyor. Okuması da gayet keyifli.

➡️ Kitap Tanıtımı:

💡 Neden kanalizasyon kapakları kare değil de daire biçimindedir?

💡 Neden bira kutularının altı ve üstü, ortasından daha dardır?

💡 Dünyada kaç tane piyano akortçusu vardır?

💡 Aynadaki bir görüntüde neden ‘yukarı ile aşağı’ yer değiştirmez de ‘sağ ile sol’ yer değiştirir?

Microsoft ve diğer ileri teknoloji şirketleri, zorlukları dillere destan iş görüşmelerinde yıllardır bunlara benzer bulmaca ve bilmeceler soruyorlar.

“Bulmacalı mülakat”, günümüzde giderek yaygınlaşan bir moda. Wall Street’ten Silikon Vadisi’ne, birçok farklı alanda işverenler bugünün aşırı rekabetçi küresel pazarında ayakta kalabilmek için gerekli olan zekâ, yaratıcılık ve problem çözme becerisi gibi özellikleri ölçmek için adaylara zor ve hileli sorular soruyorlar.

Fuji Dağı’nı Nasıl Taşırsınız?, iş dünyasında yer alan herkes için vazgeçilmez bir kitap. Birçok aday arasından en yetenekli elemanları bulmak isteyen yöneticiler bulmacalı mülakat hazırlamanın yollarını öğrenecekler. İş arayanlar, belki de hayatlarının işine ulaşma yolunda en çetin sorularla bile nasıl baş edebileceklerini öğrenme fırsatını elde edecekler.

Zekâ bulmacası meraklıları ise, bu kitapta pek çok yaratıcı ve orijinal soru ile bunların yanıtlarını bulacaklar…

💊 Sayfa Sayısı: 259

💊 Baskı Yılı: 2005

💊 Yayınevi: Odtü

💊 İlk Baskı Yılı : 2005

💊 Dil : Türkçe

➡️ Kitabın Bölümleri

1️⃣ Çözümü imkansız soru

2️⃣ Termanlar ve Silikon Vadisi

3️⃣ Bill Gates ve Bulmaca Kültürü

4️⃣ Microsoft Mülakat Bulmacaları

5️⃣ İpucundan Yoksunluğu Kabullenmek

6️⃣ Wall Street ve Stres Mülakatı

7️⃣ En zor mülakat soruları

8️⃣ Bulmacalı mülakatın üstesinden gelmenin yolları

9️⃣ Yeniliğe dayalı şirketler nasıl mülakat yapmalı

LeetCode Çözümlerİ – 917. Reverse Only Letters [Microsoft Mülakat Sorusu]

LeetCode içerisinde bulunan “Reverse Only Letters”‘ sorusunun açıklaması ve çözümü. Bu soruda verilen sadece string içerisindeki harfleri tersinden yazdırmanız isteniyor. LeetCode’a göre Microsoft mülakatlarında sorulmuş sorulardan biri.

🔥 LeetCode 917. Reverse Only Letters: https://leetcode.com/problems/reverse-only-letters/

➡️ Problem açıklaması:

Given a string S, return the “reversed” string where all characters that are not a letter stay in the same place, and all letters reverse their positions.

Example 1:

Input: “ab-cd”

Output: “dc-ba”

Example 2:

Input: “a-bC-dEf-ghIj”

Output: “j-Ih-gfE-dCba”

Example 3:

Input: “Test1ng-Leet=code-Q!”

Output: “Qedo1ct-eeLg=ntse-T!”

Note: S.length LessOrSmaller= 100

33 LessOrSmaller= S[i].ASCIIcode LessOrSmaller= 122

S doesn’t contain \ or “

LeetCode May Challenge – Ransom Note – [Microsoft Mülakat Sorusu] 3. GÜN

LeetCode’un mayıs ayı için her gün bir programlama sorusu sorduğu “May Challenge”‘ın üçüncü gün sorusu “Ransom Note””un açıklaması ve çözümü. Leetcode’a göre bu soru Microsoft mülakatlarında sorulan sorulardan biriymiş. #LeetCode #Programlama #Microsoft

🔥 LeetCode May Challenge: https://leetcode.com/explore/featured/card/may-leetcoding-challenge

➡️ Problem açıklaması:

Given an arbitrary ransom note string and another string containing letters from all the magazines, write a function that will return true if the ransom note can be constructed from the magazines ; otherwise, it will return false.

Each letter in the magazine string can only be used once in your ransom note.

Note: You may assume that both strings contain only lowercase letters.

canConstruct(“a”, “b”) — false

canConstruct(“aa”, “ab”) — false

canConstruct(“aa”, “aab”) — true