Pratik
27 konuda 370 problem. İpuçları birer birer gelir, çözüm sen isteyene kadar kapalı kalır.
370 problem
Konu · Diziler
0 / 20 tamamlandı- KolayTek seferlik hisse alım satımı#single-pass#running-minimumO(n) zamanO(1) alan15 dkInput: prices = [8, 3, 6, 1, 9, 4]Output: 8Başla
- KolaySıralı listede tekrarları at#two-pointers#in-placeO(n) zamanO(1) alan15 dkInput: nums = [1, 1, 2, 3, 3, 3]Output: 3, and nums begins with [1, 2, 3]Başla
- OrtaDiğerlerinin çarpımı#prefix-products#two-passO(n) zamanO(n) alanGiriş yap25 dkInput: nums = [2, 3, 4, 5]Output: [60, 40, 30, 24]Başla
- OrtaTekrarsız en uzun aralık#sliding-window#hash-mapO(n) zamanO(n) alanGiriş yap25 dkInput: items = [1, 2, 3, 2, 4, 5]Output: 4Başla
- ZorPencere maksimumları#sliding-window#monotonic-dequeO(n) zamanO(n) alanGiriş yap40 dkInput: nums = [1, 4, 2, 7, 3, 3], k = 3Output: [4, 7, 7, 7]Başla
- KolayÇoğunluk değeri#counting#single-passO(n) zamanO(1) alan15 dkInput: nums = [3, 3, 4]Output: 3Başla
- Ortak adım sağa döndür#in-place#reversalO(n) zamanO(1) alanGiriş yap25 dkInput: nums = [1, 2, 3, 4, 5, 6, 7], k = 3Output: [5, 6, 7, 1, 2, 3, 4]Başla
- OrtaSpiral grid dolaşma#matrix-traversal#boundary-shrinkingO(rows · cols) zamanO(rows · cols) alanGiriş yap25 dkInput: [[7]]Output: [7]Başla
- KolayHedef değerleri sona it#two-pointers#write-pointerO(n) zamanO(1) alan15 dkInput: nums = [4, 0, 7, 0, 2], v = 0Output: [4, 7, 2, 0, 0]Başla
- OrtaSubarray Sums Divisible by K#prefix-sums#hash-map#modular-arithmeticO(n) zamanO(min(n, k)) alanGiriş yap25 dkInput: nums = [2, -2, 3, 1, 5], k = 3Output: 6Başla
- ZorEksik en küçük pozitif sayı#cyclic-sort#index-as-homeO(n) zamanO(1) alanGiriş yap35 dkInput: nums = [5, 3, -1, 1, 2]Output: 4Başla
- ZorÇubuklar arasında biriken su#two-pointers#running-maximumO(n) zamanO(1) alanGiriş yap35 dkInput: heights = [3, 0, 2, 0, 4, 1, 2]Output: 8Başla
- KolaySıralı listenin kareleri#two-pointers#merge-from-backO(n) zamanO(n) alan15 dkInput: nums = [-5, -2, 1, 3, 4]Output: [1, 4, 9, 16, 25]Başla
- KolayHer k'lık bloğu ters çevir#in-place-reversal#two-pointersO(n) zamanO(1) alan15 dkInput: nums = [1, 2, 3, 4, 5, 6, 7, 8], k = 3Output: [3, 2, 1, 6, 5, 4, 7, 8]Başla
- KolayDenge noktası indeksi#prefix-sums#running-sumO(n) zamanO(1) alan15 dkInput: values = [2, 7, 1, 5, 4]Output: 2Başla
- OrtaBütçeye sığan en uzun pencere#sliding-window#two-pointersO(n) zamanO(1) alanGiriş yap25 dkInput: costs = [4, 1, 1, 3, 2, 6], budget = 6Output: 3Başla
- KolaySonrakilerin hepsinden uzun#running-maximum#linear-scanO(n) zamanO(n) alan15 dkInput: heights = [16, 17, 4, 3, 5, 2]Output: [17, 5, 2]Başla
- OrtaToplamı sıfır olan üç değer#two-pointers#sort-first#skip-duplicatesO(n²) zamanO(n²) alanGiriş yap30 dkInput: nums = [-1, 0, 1, 2, -1, -4]Output: [[-1, -1, 2], [-1, 0, 1]]Başla
- OrtaBir sonraki büyük dizilim#in-place-reversal#suffix-scanO(n) zamanO(1) alanGiriş yap25 dkInput: nums = [1, 3, 2]Output: [2, 1, 3]Başla
- OrtaEn büyük çarpımlı subarray#kadane#running-min-maxO(n) zamanO(n) alanGiriş yap25 dkInput: nums = [2, 3, -2, 4]Output: 6Başla
Konu · String'ler
0 / 16 tamamlandı- KolayEn uzun ortak prefix#column-scan#string-comparisonO(total characters) zamanO(len(words) + len(words[0])) alan15 dkInput: words = ["flower", "flow", "flight"]Output: "fl"Başla
- Kolayİlk benzersiz karakter#hash-map#two-passO(n) zamanO(k) alan15 dkInput: text = "reference"Output: 2Başla
- OrtaRun-length sıkıştırma#two-pointers#run-length-encodingO(n) zamanO(n) alanGiriş yap25 dkInput: text = "aaabccdddd"Output: "a3bc2d4"Başla
- OrtaRakam string'lerini çarp#digit-arithmetic#carry-propagationO(len(a) · len(b)) zamanO(len(a) + len(b)) alanGiriş yap30 dkInput: a = "123", b = "456"Output: "56088"Başla
- ZorEn küçük kapsayan pencere#sliding-window#hash-mapO(len(text) + len(need)) zamanO(len(text) + len(need)) alanGiriş yap45 dkInput: text = "ADOBECODEBANC", need = "ABC"Output: "BANC"Başla
- OrtaAnagramları grupla#hash-map#canonical-formO(n · k log k) zamanO(n · k) alanGiriş yap20 dkInput: words = ["eat", "tea", "tan", "ate", "nat", "bat"]Output: [["ate", "eat", "tea"], ["bat"], ["nat", "tan"]]Başla
- OrtaRepeated DNA Sequences#rolling-hash#hash-setO(n) zamanO(n) alanGiriş yap30 dkInput: dna = "AAAAACCCCCAAAAACCCCCCAAAAAGGGTTT"Output: ["AAAAACCCCC", "CCCCCAAAAA"]Başla
- KolayBir silmeden sonra palindrom#two-pointers#greedyO(n) zamanO(1) alan20 dkInput: s = "racexcar"Output: TrueBaşla
- KolayKelime sırasını ters çevir#two-pointers#word-splitO(n) zamanO(n) alan10 dkInput: s = " the sky is blue "Output: "blue is sky the"Başla
- ZorBaşa ekleyerek en kısa palindrom#kmp#palindromeO(n) zamanO(n) alanGiriş yap40 dkInput: s = "abacd"Output: "dcabacd"Başla
- OrtaPalindromik substring'leri say#expand-around-center#palindromeO(n²) zamanO(1) alanGiriş yap25 dkInput: s = "level"Output: 7Başla
- OrtaEn küçük tekrar birimi#kmp#string-periodO(n) zamanO(n) alanGiriş yap25 dkInput: s = "xyzxyzxyz"Output: "xyz"Başla
- ZorHer prefix ne sıklıkla geçiyor#z-algorithm#suffix-sumsO(n) zamanO(n) alanGiriş yap40 dkInput: s = "abacaba"Output: [4, 2, 2, 1, 1, 1, 1]Başla
- KolayKelime listesini tek string'e paketle#length-prefix#string-parsingO(L) zamanO(L) alan20 dkInput: words = ["hi", "#1"]Output: pack -> "2#hi2##1"Başla
- OrtaBir metindeki anagram konumları#fixed-sliding-window#frequency-countO(len(text) + len(key)) zamanO(len(text)) alanGiriş yap25 dkInput: text = "cbaebabacd", key = "abc"Output: [0, 6]Başla
- KolayRoma rakamından tam sayıya#string-scan#lookup-tableO(n) zamanO(1) alan15 dkInput: s = "LVIII"Output: 58Başla
Konu · Arama
0 / 13 tamamlandı- KolayTam sayı karekök#binary-search#monotonic-predicateO(log n) zamanO(1) alan20 dkInput: n = 8Output: 2Başla
- Ortaİnişli çıkışlı listede tepe#binary-search#slope-followingO(log n) zamanO(1) alanGiriş yap30 dkInput: nums = [1, 2, 3, 1]Output: 2Başla
- Zorİki sıralı listenin medyanı#binary-search#partitioningO(log min(m, n)) zamanO(1) alanGiriş yap50 dkInput: a = [1, 3], b = [2]Output: 2.0Başla
- Ortaİlk ve son konum#binary-search#boundary-searchO(log n) zamanO(1) alanGiriş yap25 dkInput: nums = [5, 7, 7, 8, 8, 10], target = 8Output: (3, 4)Başla
- OrtaEn küçük günlük kapasite#binary-search-on-answer#greedy-checkO(n log(sum(weights))) zamanO(1) alanGiriş yap30 dkInput: weights = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], days = 5Output: 15Başla
- KolayEn yakın iki kelime#single-pass#linear-scanO(n) zamanO(1) alan15 dkInput: words = ["cat", "dog", "fox", "cat", "owl", "dog"], a = "cat", b = "dog"Output: 1Başla
- OrtaDöndürmeleri say#binary-search#boundary-searchO(log n) zamanO(1) alanGiriş yap20 dkInput: nums = [15, 18, 2, 3, 6, 12]Output: 2Başla
- OrtaUzunluğu bilinmeyen listede ara#binary-search#exponential-searchO(log p) zamanO(1) alanGiriş yap25 dkInput: values = [2, 5, 5, 9, 14, 20, 31], target = 9Output: 3Başla
- KolayListede eksik k. sayı#binary-search#countingO(log n) zamanO(1) alan20 dkInput: nums = [2, 3, 4, 7, 11], k = 5Output: 9Başla
- OrtaBelirli bir andaki değer#binary-search#upper-bound#versioned-storeO(log v) zamanO(number of set calls) alanGiriş yap25 dkInput: set("port", "80", 10), get("port", 9), get("port", 10)Output: ["", "80"]Başla
- KolayHedeften sonraki harf#binary-search#upper-boundO(log n) zamanO(1) alan15 dkInput: letters = ["c", "f", "j"], target = "a"Output: "c"Başla
- OrtaDöndürülmüş sıralı listede hedef#binary-search#rotated-arrayO(log n) zamanO(1) alanGiriş yap20 dkInput: nums = [4, 5, 6, 7, 0, 1, 2], target = 0Output: 4Başla
- Zork. en küçük çift farkı#binary-search-on-answer#two-pointers#sortingO(n log n + n log(max − min)) zamanO(n) alanGiriş yap35 dkInput: nums = [1, 3, 1], k = 1Output: 0Başla
Konu · Sıralama
0 / 15 tamamlandı- KolayYerinde olmayanları say#sorting#pairwise-comparisonO(n log n) zamanO(n) alan15 dkInput: heights = [1, 1, 4, 2, 1, 3]Output: 3Başla
- OrtaÜç yollu bayrak sıralaması#dutch-national-flag#in-placeO(n) zamanO(1) alanGiriş yap30 dkInput: values = [2, 0, 2, 1, 1, 0]Output: [0, 0, 1, 1, 2, 2]Başla
- OrtaEn büyük sayı dizilimi#custom-comparator#sortingO(n log n) zamanO(n) alanGiriş yap30 dkInput: nums = [3, 30, 34, 5, 9]Output: "9534330"Başla
- OrtaAtıflardan h-indeksi#sorting#countingO(n log n) zamanO(1) alanGiriş yap20 dkInput: citations = [3, 0, 6, 1, 5]Output: 3Başla
- ZorBucket'larla en büyük boşluk#bucket-sort#pigeonholeO(n log n) zamanO(n) alanGiriş yap40 dkInput: nums = [3, 6, 9, 1]Output: 3Başla
- KolayInsertion sort kaydırma sayısı#insertion-sort#stable-sortO(n²) zamanO(n) alan15 dkInput: nums = [3, 1, 2]Output: 2Başla
- OrtaBağlı bir zinciri sırala#divide-and-conquer#fast-slow-pointersO(n log n) zamanO(log n) alanGiriş yap30 dkInput: 4 -> 1 -> 3 -> 1 -> 2Output: 1 -> 1 -> 2 -> 3 -> 4Başla
- OrtaSıralamak için en az yer değiştirme#cycle-decomposition#selection-sortO(n log n) zamanO(n) alanGiriş yap25 dkInput: nums = [4, 3, 1, 2]Output: 3Başla
- OrtaBölümlemeyle k. en küçük#quickselect#three-way-partitionO(n) zamanO(n) alanGiriş yap30 dkInput: nums = [7, 2, 9, 4, 4, 1], k = 3Output: 4Başla
- KolayBütçenin altındaki çiftler#sorting#two-pointersO(n log n) zamanO(n) alan20 dkInput: prices = [4, -2, 0, 3, 1], budget = 3Output: 5Başla
- Ortak basamak geçişinden sonraki sıra#radix-sort#stable-sort#bucket-sortO(k · n) zamanO(n) alanGiriş yap25 dkInput: nums = [53, 7, 318, 90, 41, 206, 17], k = 1Output: [90, 41, 53, 206, 7, 17, 318]Başla
- ZorSırası bozuk çiftleri say#merge-sort#divide-and-conquer#inversion-countO(n log n) zamanO(n) alanGiriş yap35 dkInput: nums = [2, 4, 1, 3, 5]Output: 3Başla
- KolayBaşka bir listenin sırasına göre sırala#counting-sort#custom-orderO(n + k) zamanO(n + k) alan15 dkInput: values = [2, 3, 1, 3, 2, 4, 6, 7, 9, 2, 19], order = [2, 1, 4, 3, 9, 6]Output: [2, 2, 2, 1, 4, 3, 3, 9, 6, 7, 19]Başla
- OrtaKrep çevirerek sırala#selection-sort#prefix-reversalO(n²) zamanO(n) alanGiriş yap25 dkInput: arr = [3, 2, 4, 1]Output: [3, 4, 2, 3, 2]Başla
- KolayFarkı en küçük çiftler#sort-first#adjacent-scanO(n log n) zamanO(n) alan15 dkInput: nums = [4, 2, 1, 3]Output: [[1, 2], [2, 3], [3, 4]]Başla
Konu · Bağlı listeler
0 / 14 tamamlandı- KolaySıralı zincirleri birleştir#two-pointers#dummy-nodeO(n + m) zamanO(1) alan20 dkInput: a = 1 -> 4 -> 6, b = 2 -> 3Output: 1 -> 2 -> 3 -> 4 -> 6Başla
- OrtaSondan n. düğümü sil#fast-slow-pointers#dummy-nodeO(L) zamanO(1) alanGiriş yap25 dkInput: head = 1 -> 2 -> 3 -> 4 -> 5, n = 2Output: 1 -> 2 -> 3 -> 5Başla
- OrtaListe yarılarını iç içe geçir#fast-slow-pointers#list-reversalO(n) zamanO(1) alanGiriş yap35 dkInput: head = 1 -> 2 -> 3 -> 4Output: 1 -> 4 -> 2 -> 3Başla
- KolayDeğeri tutan düğümleri sil#dummy-node#pointer-relinkingO(n) zamanO(1) alan15 dkInput: head = 1 -> 2 -> 6 -> 3 -> 6, target = 6Output: 1 -> 2 -> 3Başla
- Ortaİki rakam zincirini topla#dummy-node#carry-propagationO(max(m, n)) zamanO(max(m, n)) alanGiriş yap25 dkInput: a = 2 -> 4 -> 3, b = 5 -> 6 -> 4Output: 7 -> 0 -> 8Başla
- OrtaBir değer etrafında böl#dummy-node#list-splittingO(n) zamanO(1) alanGiriş yap30 dkInput: head = 1 -> 4 -> 3 -> 2 -> 5 -> 2, pivot = 3Output: 1 -> 2 -> 2 -> 4 -> 3 -> 5Başla
- KolayZincirde döngü#fast-slow-pointers#cycle-detectionO(n) zamanO(1) alan15 dkInput: values = [3, 2, 0, -4], pos = 1Output: TrueBaşla
- KolayGeri ve ileri geçmişi#doubly-linked-list#designO(n + Σk) zamanO(n) alan20 dkInput: home = "x", ops = [("back", 2), ("forward", 3)]Output: ['x', 'x']Başla
- OrtaDöngü nerede başlıyor#fast-slow-pointers#cycle-detectionO(n) zamanO(1) alanGiriş yap30 dkInput: values = [3, 2, 0, -4], pos = 1Output: 2Başla
- OrtaAtlama bağlantılı zinciri klonla#pointer-relinking#in-placeO(n) zamanO(n) alanGiriş yap30 dkInput: chain = [(3, None), (8, 0), (5, 3), (1, 1)]Output: [(3, None), (8, 0), (5, 3), (1, 1)], built from new nodes onlyBaşla
- KolayZincir tersten de aynı mı#fast-slow-pointers#in-place-reversalO(n) zamanO(1) alan20 dkInput: 1 -> 2 -> 2 -> 1Output: TrueBaşla
- OrtaLeast Recently Used Cache#doubly-linked-list#hash-map#sentinel-nodesO(1) zamanO(capacity) alanGiriş yap35 dkBaşla
- ZorDüğümleri k'lık gruplarla ters çevir#in-place-reversal#dummy-headO(n) zamanO(1) alanGiriş yap35 dkInput: list = 1 -> 2 -> 3 -> 4 -> 5, k = 2Output: 2 -> 1 -> 4 -> 3 -> 5Başla
- Kolayİki zincir nerede birleşiyor#two-pointers#list-traversalO(m + n) zamanO(1) alan15 dkInput: a = 2 -> 6 -> 4, b = 1 -> 5, no shared nodesOutput: NoneBaşla
Konu · Stack ve kuyruklar
0 / 15 tamamlandı- KolaySabit zamanlı min stack#stack#auxiliary-stackO(1) zamanO(n) alan20 dkBaşla
- OrtaDaha sıcak güne kadar#monotonic-stackO(n) zamanO(n) alanGiriş yap30 dkInput: temps = [30, 32, 31, 35]Output: [1, 2, 1, 0]Başla
- KolayKomşu çiftleri sil#stack#string-scanO(n) zamanO(n) alan15 dkInput: text = "abbaca"Output: "ca"Başla
- Ortaİç içe tekrarları çöz#stack#string-parsingO(output · depth) zamanO(output + depth) alanGiriş yap30 dkInput: text = "3[a]2[bc]"Output: "aaabcbc"Başla
- ZorEn büyük çubuk dikdörtgeni#monotonic-stackO(n) zamanO(n) alanGiriş yap45 dkInput: heights = [2, 1, 5, 6, 2, 3]Output: 10Başla
- KolaySon penceredeki istekler#queue#sliding-windowO(n) zamanO(n) alan15 dkInput: times = [0, 400, 900, 1000, 1400], w = 1000Output: [1, 2, 3, 3, 3]Başla
- Kolayİki stack'li kuyruk işlemleri#two-stacks#amortizedO(m) zamanO(m) alan15 dkInput: ops = [["push", 7], ["pop"], ["push", 8], ["push", 9], ["peek"]]Output: [7, 8]Başla
- OrtaRing buffer deque#circular-buffer#designO(1) zamanO(capacity) alanGiriş yap25 dkBaşla
- KolayPostfix token'larını değerlendir#stack#expression-evaluationO(n) zamanO(n) alan15 dkInput: tokens = ["2", "1", "+", "3", "*"]Output: 9Başla
- OrtaSırada çarpışan kayalar#stack#pop-while-weakerO(n) zamanO(n) alanGiriş yap25 dkInput: rocks = [5, 10, -5]Output: [5, 10]Başla
- ZorParantezli toplamları hesapla#stack#expression-parsing#sign-trackingO(n) zamanO(depth) alanGiriş yap40 dkInput: s = "1 + 1"Output: 2Başla
- KolaySonraki büyük değer araması#monotonic-stack#hash-mapO(n + q) zamanO(n + q) alan15 dkInput: nums = [4, 1, 3, 6, 2, 5], queries = [1, 3, 2, 6]Output: [3, 6, 5, -1]Başla
- Kolayİndirimden sonraki fiyatlar#monotonic-stack#next-smallerO(n) zamanO(n) alan15 dkInput: prices = [8, 4, 6, 2, 3]Output: [4, 2, 4, 2, 3]Başla
- OrtaUnix yolunu sadeleştir#stack#string-parsingO(n) zamanO(n) alanGiriş yap20 dkInput: path = "/a/./b/../../c/"Output: "/c"Başla
- ZorToplamı en az k olan en kısa blok#monotonic-deque#prefix-sumO(n) zamanO(n) alanGiriş yap40 dkInput: nums = [2, -1, 2], k = 3Output: 3Başla
Konu · Hash tabloları
0 / 14 tamamlandı- KolayTekrar eden değer kontrolü#hash-set#single-passO(n) zamanO(n) alan10 dkInput: items = [4, 1, 9, 1]Output: TrueBaşla
- OrtaToplamı k olan subarray'ler#prefix-sums#hash-mapO(n) zamanO(n) alanGiriş yap30 dkInput: nums = [1, 2, 3, 1], k = 3Output: 2Başla
- OrtaEn uzun ardışık seri#hash-set#countingO(n) zamanO(n) alanGiriş yap30 dkInput: nums = [9, 4, 2, 3, 1, 8]Output: 4Başla
- Kolayİki listenin ortak değerleri#hash-set#membership-testO(n + m) zamanO(m) alan15 dkInput: a = [1, 2, 2, 1], b = [2, 2]Output: [2]Başla
- KolayTutarlı yeniden adlandırma kontrolü#hash-map#bijectionO(n) zamanO(n) alan20 dkInput: a = "egg", b = "add"Output: TrueBaşla
- OrtaDört listeden sıfır toplamlı dörtlüler#hash-map#meet-in-the-middleO(n²) zamanO(n²) alanGiriş yap30 dkInput: a = [1, 2], b = [-2, -1], c = [-1, 2], d = [0, 2]Output: 2Başla
- KolayEn yakın tekrar mesafesi#hash-map#single-passO(n) zamanO(n) alan15 dkInput: values = [7, 1, 3, 7, 1, 7]Output: 2Başla
- OrtaLinear probing nereye düşer#open-addressing#union-findO(m + n log m) zamanO(m) alanGiriş yap30 dkInput: m = 7, keys = [10, 3, 17, 24, 5]Output: [3, 4, 5, 6, 0]Başla
- OrtaHarfleri frekansa göre sırala#bucket-sort#countingO(n) zamanO(n) alanGiriş yap20 dkInput: text = "banana"Output: "aaannb"Başla
- ZorLeast Frequently Used Cache#design#hash-map#frequency-bucketsO(1) zamanO(capacity) alanGiriş yap45 dkBaşla
- OrtaSıfır ve birlerin en uzun dengeli kısmı#prefix-sum#first-seen-indexO(n) zamanO(n) alanGiriş yap20 dkInput: bits = [0, 1, 0]Output: 2Başla
- KolayFarkı k olan çiftleri say#hash-map#complement-lookupO(n) zamanO(n) alan15 dkInput: nums = [3, 1, 4, 1, 5], k = 2Output: 2Başla
- KolayDergiden fidye notu#frequency-count#hash-mapO(n + m) zamanO(1) alan10 dkInput: note = "aab", banner = "baa"Output: TrueBaşla
- OrtaHarf kaydırmasıyla kelimeleri grupla#canonical-key#hash-map#groupingO(n · L) zamanO(n · L) alanGiriş yap20 dkInput: words = ["abc", "bcd", "acef", "xyz", "az", "ba", "a", "z"]Output: [["abc", "bcd", "xyz"], ["acef"], ["az", "ba"], ["a", "z"]]Başla
Konu · Özyineleme
0 / 14 tamamlandı- Kolayİç içe listeyi düzleştir#recursion#tree-walkO(n) zamanO(n) alan15 dkInput: items = [1, [2, [3, 4]], 5]Output: [1, 2, 3, 4, 5]Başla
- OrtaDisk kulesi hamleleri#recursion#divide-and-conquerO(2ⁿ) zamanO(2ⁿ) alanGiriş yap20 dkInput: n = 1, src = "A", dst = "C", spare = "B"Output: [("A", "C")]Başla
- OrtaHızlı üs alma#recursion#divide-and-conquerO(log |exp|) zamanO(log |exp|) alanGiriş yap20 dkInput: base = 2, exp = 10Output: 1024Başla
- KolayDerinlik ağırlıklı iç içe toplam#recursion#pass-downO(n) zamanO(d) alan15 dkInput: items = [[1, 1], 2, [1, 1]]Output: 10Başla
- Ortaİkiye katlanan satırdaki sembol#recursion#halvingO(n) zamanO(n) alanGiriş yap25 dkInput: n = 4, k = 5Output: 1Başla
- OrtaParantezlemenin her yolu#divide-and-conquer#memoizationO(4ⁿ / √n) zamanO(4ⁿ / √n) alanGiriş yap30 dkInput: expr = "2-1-1"Output: [0, 2]Başla
- OrtaBST'de k. en küçük anahtar, iteratif#explicit-stack#inorderO(h + k) zamanO(h) alanGiriş yap25 dkInput: same tree; k = 8Output: 14Başla
- KolayYarıya indir ya da bir çıkar#tail-recursion#bit-countingO(log n) zamanO(1) alan15 dkInput: n = 14Output: 6Başla
- KolayLook-and-say dizisinin terimi#recursion#run-lengthO(1.31ⁿ) zamanO(1.31ⁿ) alan15 dkInput: n = 4Output: "1211"Başla
- OrtaBelirli uzunlukta ters dönen sayılar#recursion#build-from-inside-outO(n · 5^(n/2)) zamanO(n · 5^(n/2)) alanGiriş yap25 dkInput: n = 2Output: ["11", "69", "88", "96"]Başla
- KolayNth Tribonacci Number#recurrence#rolling-stateO(n) zamanO(1) alan10 dkInput: n = 4Output: 4Başla
- ZorKarıştırılmış string kontrolü#recursion#memoization#divide-and-conquerO(n⁴ log n) zamanO(n³) alanGiriş yap40 dkInput: s1 = "great", s2 = "rgeat"Output: TrueBaşla
- OrtaÇemberde ayakta kalan son arkadaş#recursion#josephus#recurrenceO(n) zamanO(1) alanGiriş yap25 dkInput: n = 5, k = 2Output: 3Başla
- KolayNoktalamayı yok sayan palindrom kontrolü#tail-recursion#two-pointersO(n) zamanO(1) alan15 dkInput: s = "A man, a plan, a canal: Panama"Output: TrueBaşla
Konu · Backtracking
0 / 14 tamamlandı- OrtaTelefon tuş takımı kelimeleri#backtracking#decision-treeO(n · 3ⁿ) zamanO(n · 3ⁿ) alanGiriş yap20 dkInput: digits = "23"Output: ["ad", "ae", "af", "bd", "be", "bf", "cd", "ce", "cf"]Başla
- OrtaHedefe toplanan kombinasyonlar#backtracking#pruningO(n^(target / min)) zamanO(n^(target / min)) alanGiriş yap25 dkInput: nums = [2, 3, 6, 7], target = 7Output: [[2, 2, 3], [7]]Başla
- OrtaPalindromlara böl#backtracking#pruningO(n · 2ⁿ) zamanO(n · 2ⁿ) alanGiriş yap25 dkInput: s = "aab"Output: [["a", "a", "b"], ["aa", "b"]]Başla
- KolayBüyük-küçük harf varyantları#backtracking#include-excludeO(n · 2^L) zamanO(n · 2^L) alan15 dkInput: s = "a1b"Output: ["a1b", "a1B", "A1b", "A1B"]Başla
- OrtaDengeli parantez string'leri#backtracking#pruningO(4ⁿ / √n) zamanO(4ⁿ / √n) alanGiriş yap25 dkInput: n = 3Output: ["((()))", "(()())", "(())()", "()(())", "()()()"]Başla
- ZorVezir yerleşimlerini say#backtracking#constraint-setsO(n!) zamanO(n) alanGiriş yap40 dkInput: n = 4Output: 2Başla
- OrtaFarklı dizilimler#backtracking#pruning#sortingO(n · n!) zamanO(n · n!) alanGiriş yap30 dkInput: vals = [1, 2, 1]Output: [[1, 1, 2], [1, 2, 1], [2, 1, 1]]Başla
- OrtaRakamlardan noktalı adresler#backtracking#pruningO(1) zamanO(1) alanGiriş yap30 dkInput: s = "25525511135"Output: ["255.255.11.135", "255.255.111.35"]Başla
- ZorSudoku grid'ini doldur#backtracking#constraint-setsGiriş yap45 dkInput: the first row is "11......." and the rest are emptyOutput: FalseBaşla
- ZorKibritlerden kare#backtracking#pruning#k-way-partitionO(4ⁿ) zamanO(n) alanGiriş yap40 dkInput: sticks = [1, 1, 2, 2, 2]Output: TrueBaşla
- KolayYan yana 1 olmayan ikili string'ler#backtracking#pruningO(n · 1.62ⁿ) zamanO(n · 1.62ⁿ) alan15 dkInput: n = 3Output: ["000", "001", "010", "100", "101"]Başla
- OrtaHarf grid'inde kelime izle#backtracking#grid-dfs#pruningO(rows · cols · 3^L) zamanO(rows · cols + L) alanGiriş yap25 dkInput: board = ["ABCE", "SFCS", "ADEE"], word = "ABCCED"Output: TrueBaşla
- Kolayİlk n sayıdan k tanesini seç#backtracking#combinations#pruningO(k · C(n, k)) zamanO(k · C(n, k)) alan15 dkInput: n = 4, k = 2Output: [[1, 2], [1, 3], [1, 4], [2, 3], [2, 4], [3, 4]]Başla
- KolaySınırı aşmayan rakam dizilimleri#backtracking#permutations#pruningO(n · n!) zamanO(n!) alan15 dkInput: digits = [3, 1, 2], limit = 300Output: [123, 132, 213, 231]Başla
Konu · Greedy algoritmalar
0 / 13 tamamlandı- OrtaÇakışmayı bitiren en az silme#greedy#interval-scheduling#sortingO(n log n) zamanO(1) alanGiriş yap20 dkInput: spans = [(1, 2), (2, 3), (3, 4), (1, 3)]Output: 1Başla
- OrtaSona en az sıçrayış#greedy#reach-frontierO(n) zamanO(1) alanGiriş yap20 dkInput: nums = [2, 3, 1, 1, 4]Output: 2Başla
- OrtaString'i bloklara böl#greedy#last-occurrenceO(n) zamanO(1) alanGiriş yap20 dkInput: s = "abacdc"Output: [3, 3]Başla
- KolayKurabiye dağıt#greedy#sorting#two-pointersO(n log n + m log m) zamanO(n + m) alan15 dkInput: wants = [1, 2, 3], sizes = [1, 1]Output: 1Başla
- OrtaDairesel yakıt rotası#greedy#running-sumO(n) zamanO(1) alanGiriş yap25 dkInput: fuel = [1, 2, 3, 4, 5], cost = [3, 4, 5, 1, 2]Output: 3Başla
- ZorAdil şeker payları#greedy#two-passO(n) zamanO(n) alanGiriş yap40 dkInput: scores = [1, 0, 2]Output: 5Başla
- OrtaHalatları en ucuza birleştir#greedy#min-heapO(n log n) zamanO(n) alanGiriş yap25 dkInput: lengths = [4, 3, 2, 6]Output: 29Başla
- KolayAdayları iki şehir arasında böl#greedy#sort-by-differenceO(n log n) zamanO(n) alan20 dkInput: costs = [[10, 20], [30, 200], [400, 50], [30, 20]]Output: 110Başla
- OrtaKatılabileceğin en çok etkinlik#greedy#min-heap#earliest-deadlineO(n log n) zamanO(n) alanGiriş yap30 dkInput: events = [[1, 2], [2, 3], [3, 4], [1, 2]]Output: 4Başla
- OrtaYayını kaplayan en az klip#greedy#reach-frontier#interval-coverO(n + T) zamanO(T) alanGiriş yap25 dkInput: clips = [[0, 2], [4, 6], [8, 10], [1, 9], [1, 5], [5, 9]], T = 10Output: 3Başla
- KolayPozitif gidiş için en küçük başlangıç#running-sum#prefix-minimumO(n) zamanO(1) alan10 dkInput: nums = [-3, 2, -3, 4, 2]Output: 5Başla
- OrtaEn uzun çift zinciri#greedy#sort-by-end#interval-schedulingO(n log n) zamanO(n) alanGiriş yap20 dkInput: pairs = [[1, 2], [2, 3], [3, 4]]Output: 2Başla
- KolaySon indekse ulaşılabilir mi#greedy#farthest-reachO(n) zamanO(1) alan15 dkInput: jumps = [2, 3, 1, 1, 4]Output: TrueBaşla
Konu · Ağaçlar ve BST
0 / 17 tamamlandı- KolayEn derin seviye sayısı#dfs#recursionO(n) zamanO(h) alan15 dkInput: tree = 3 with children 9 and 20, where 20 has children 15 and 7Output: 3Başla
- OrtaZigzag seviye dolaşması#bfs#level-orderO(n) zamanO(n) alanGiriş yap30 dkInput: tree = 3 with children 9 and 20, where 20 has children 15 and 7Output: [[3], [20, 9], [15, 7]]Başla
- OrtaSağ kenar görünümü#bfs#level-orderO(n) zamanO(n) alanGiriş yap25 dkInput: tree = 1, left child 2 with right child 5, right child 3 with right child 4Output: [1, 3, 4]Başla
- KolayAyna simetrisi kontrolü#recursion#paired-traversalO(n) zamanO(h) alan20 dkInput: tree = 1, left 2 with children 3 and 4, right 2 with children 4 and 3Output: TrueBaşla
- KolayKökten yaprağa hedef toplam#dfs#recursionO(n) zamanO(h) alan20 dkInput: tree = 1 with a single left child 2; target = 1Output: FalseBaşla
- OrtaDüğümden düğüme en geniş yol#dfs#post-orderO(n) zamanO(h) alanGiriş yap30 dkInput: tree = 1 with left child 2 having children 4 and 5, and right child 3Output: 3Başla
- Zorİki dolaşmadan yeniden kur#divide-and-conquer#hash-map#recursionO(n) zamanO(n) alanGiriş yap45 dkInput: before = [3, 9, 20, 15, 7], middle = [9, 3, 15, 20, 7]Output: 3 with left child 9 and right child 20, whose children are 15 and 7Başla
- KolayBST'de en yakın anahtar#bst#search-pathO(h) zamanO(1) alan15 dkInput: same tree; target = 12.2Output: 14Başla
- Ortaİki BST anahtarı arasındaki mesafe#bst#lowest-common-ancestorO(h) zamanO(1) alanGiriş yap25 dkInput: same tree; a = 6, b = 7Output: 1Başla
- KolayEn sığ yaprak derinliği#bfs#level-orderO(n) zamanO(w) alan15 dkInput: tree = 6, left 2 (whose left is 1, whose left is 0), right 9Output: 2Başla
- OrtaAğacı zincire düzleştir#preorder#explicit-stackO(n) zamanO(h) alanGiriş yap25 dkInput: tree = 7, left 3 (children 1 and 5), right 9 (left child 8)Output: chain 7 -> 3 -> 1 -> 5 -> 9 -> 8Başla
- OrtaAğacın üstten görünümü#bfs#column-indexO(n) zamanO(n) alanGiriş yap25 dkInput: tree = 8, left 4, whose left is 2Output: [2, 4, 8]Başla
- OrtaAğacın içindeki en büyük BST#post-order#bstO(n) zamanO(h) alanGiriş yap30 dkInput: tree = 5, left 3, right 8 (children 7 and 9)Output: 5Başla
- OrtaKompakt BST serileştirme#preorder#monotonic-stack#bstO(n) zamanO(n) alanGiriş yap30 dkInput: tree = 8, left 3 (children 1 and 6), right 10 (right child 14)Output: encode -> "8 3 1 6 10 14"Başla
- Kolayİkili ağacı yansıt#recursion#tree-traversalO(n) zamanO(h) alan10 dkInput: tree = 4, left 2 (children 1 and 3), right 7 (children 6 and 9)Output: [4, 7, 2, 9, 6, 3, 1]Başla
- ZorDüğümler arası en iyi yol toplamı#post-order#tree-dp#global-bestO(n) zamanO(h) alanGiriş yap35 dkInput: tree = -10, left 9, right 20 (children 15 and 7)Output: 42Başla
- KolayYükseklik dengeli ağaç kontrolü#post-order#early-exitO(n) zamanO(h) alan15 dkInput: tree = 3, left 9, right 20 (children 15 and 7)Output: TrueBaşla
Konu · Trie'lar
0 / 12 tamamlandı- OrtaJoker karakterli kelime araması#trie#backtrackingO(26ᵈ · m) zamanO(total characters) alanGiriş yap30 dkInput: words = ["bad", "dad", "mad"], query = ".ad"Output: TrueBaşla
- OrtaKelimeleri köklerle değiştir#trie#prefix-matchO(R + S) zamanO(R + S) alanGiriş yap25 dkInput: roots = ["cat", "bat", "rat"], sentence = "the cattle was rattled by the battery"Output: "the cat was rat by the bat"Başla
- ZorEn büyük XOR çifti#bit-trie#greedyO(n · b) zamanO(n · b) alanGiriş yap40 dkInput: nums = [3, 10, 5, 25, 2, 8]Output: 28Başla
- KolayPrefix tree işlemleri#trie#designO(L) zamanO(total characters) alan20 dkInput: insert("apple"), has_word("apple"), has_word("app"), has_prefix("app")Output: True, False, TrueBaşla
- OrtaTypeahead için ilk üç öneri#trie#prefix-matchO(n log n + total characters) zamanO(total characters) alanGiriş yap30 dkInput: products = ["mobile", "mouse", "moneypot", "monitor", "mousepad"], word = "mouse"Output: [["mobile", "moneypot", "monitor"],Başla
- ZorGrid'deki sözlük kelimeleri#trie#backtracking#grid-dfsO(cells · 4 · 3^(L−1)) zamanO(total word characters) alanGiriş yap45 dkInput: grid = [["a"]], words = ["a", "aa"]Output: ["a"]Başla
- OrtaHarf harf kurulan en uzun kelime#trie#dfsO(total characters) zamanO(total characters) alanGiriş yap25 dkInput: words = ["w", "wo", "wor", "worl", "world"]Output: "world"Başla
- KolayPrefix'e göre değer toplamı#trie#designO(L) zamanO(total characters) alan20 dkInput: put("apple", 3), total("ap"), put("app", 2), total("ap"), total("apple")Output: 3, 5, 3Başla
- ZorHarf akışında kelime sonları#trie#reversed-trie#streamO(L) zamanO(total characters + L) alanGiriş yap40 dkInput: words = ["cd", "f", "kl"], stream = "abcdefghijkl"Output: [F, F, F, T, F, T, F, F, F, F, F, T]Başla
- OrtaEn kısa benzersiz prefix'ler#trie#prefix-countO(L) zamanO(L) alanGiriş yap25 dkInput: words = ["zebra", "dog", "duck", "dove"]Output: ["z", "dog", "du", "dov"]Başla
- KolayMetindeki sözlük kelimelerini bul#trie#prefix-pruningO(n · L + W) zamanO(W + n · L) alan15 dkInput: text = "bytesofcode", words = ["byte", "bytes", "code", "of", "so"]Output: [[0, 3], [0, 4], [4, 5], [5, 6], [7, 10]]Başla
- OrtaKelime listesinin en kısa kodlaması#trie#suffix-sharingO(W) zamanO(W) alanGiriş yap25 dkInput: words = ["time", "me", "bell"]Output: 10Başla
Konu · Heap'ler
0 / 14 tamamlandı- Ortak. en büyük değer#min-heap#top-kO(n log k) zamanO(k) alanGiriş yap25 dkInput: nums = [3, 2, 1, 5, 6, 4], k = 2Output: 5Başla
- KolayEn ağır taşları parçala#max-heap#simulationO(n log n) zamanO(n) alan20 dkInput: stones = [2, 7, 4, 1, 8, 1]Output: 1Başla
- OrtaOrijine en yakın noktalar#max-heap#top-kO(n log k) zamanO(k) alanGiriş yap30 dkInput: points = [[3, 3], [5, -1], [-2, 4]], k = 2Output: [(3, 3), (-2, 4)]Başla
- ZorAkıştaki medyan#two-heaps#streamingO(n log n) zamanO(n) alanGiriş yap45 dkInput: stream = [5, 15, 1, 3]Output: [5.0, 10.0, 5.0, 4.0]Başla
- OrtaGörev zamanlayıcıda bekleme süresi#heap#greedyO(n log d + n · gap) zamanO(d) alanGiriş yap35 dkInput: tasks = ["a", "a", "a", "b", "b", "b"], gap = 2Output: 8Başla
- OrtaHarfleri aralıklı diz#heap#greedyO(n log d) zamanO(n) alanGiriş yap30 dkInput: s = "aab"Output: "aba"Başla
- KolayDizi min-heap mi#heap#array-as-treeO(n) zamanO(1) alan15 dkInput: values = [1, 3, 2, 7, 4]Output: TrueBaşla
- OrtaNeredeyse sıralı listeyi sırala#min-heap#k-sortedO(n log k) zamanO(n) alanGiriş yap25 dkInput: nums = [3, 1, 2, 6, 4, 5], k = 2Output: [1, 2, 3, 4, 5, 6]Başla
- OrtaTuğla ve merdivenle ne kadar uzağa#min-heap#greedyO(n log ladders) zamanO(ladders) alanGiriş yap30 dkInput: heights = [4, 2, 7, 6, 9, 14, 12], bricks = 5, ladders = 1Output: 4Başla
- OrtaTek CPU'da görevleri işle#min-heap#event-simulationO(n log n) zamanO(n) alanGiriş yap30 dkInput: tasks = [[1, 2], [2, 4], [3, 2], [4, 1]]Output: [0, 2, 3, 1]Başla
- KolayEn zayıf k ekip#top-k#max-heapO(m · n + m log k) zamanO(k) alan20 dkInput: roster = [[1, 1, 0, 0, 0], [1, 1, 1, 1, 0], [1, 0, 0, 0, 0], [1, 1, 0, 0, 0], [1, 1, 1, 1, 1]], k = 3Output: [2, 0, 3]Başla
- KolayHedefe en yakın k değer#top-k#max-heapO(n log k) zamanO(k) alan15 dkInput: nums = [9, 2, 14, 5, 7, 11], target = 8, k = 3Output: [5, 7, 9]Başla
- KolayListeyi yerinde heapify et#heapify#sift-downO(n) zamanO(1) alan15 dkInput: nums = [5, 3, 8, 1, 2]Output: [1, 2, 8, 3, 5]Başla
- OrtaHarfleri en az k arayla dağıt#max-heap#greedy#cooldown-queueO(n) zamanO(n) alanGiriş yap30 dkInput: s = "aabbcc", k = 3Output: "abcabc"Başla
Konu · İki heap ve k-way merge
0 / 14 tamamlandı- OrtaMatriste k. en küçük#k-way-merge#heapO(n + k log n) zamanO(n) alanGiriş yap30 dkInput: matrix = [[1, 5, 9], [10, 11, 13], [12, 13, 15]], k = 8Output: 13Başla
- Zork listeyi kapsayan en dar aralık#k-way-merge#sliding-windowO(n log k) zamanO(k) alanGiriş yap45 dkInput: lists = [[4, 10, 15, 24, 26], [0, 9, 12, 20], [5, 18, 22, 30]]Output: [20, 24]Başla
- ZorSermayeyle proje seçimi#two-heaps#greedyO(n log n) zamanO(n) alanGiriş yap40 dkInput: projects = [(0, 1), (1, 2), (2, 3)], capital = 0, rounds = 2Output: 3Başla
- Kolayk sıralı diziyi birleştir#k-way-merge#min-heapO(n log k) zamanO(n) alan20 dkInput: lists = [[1, 4, 5], [1, 3, 4], [2, 6]]Output: [1, 1, 2, 3, 4, 4, 5, 6]Başla
- OrtaEn küçük k çift toplamı#k-way-merge#min-heapO(k log k) zamanO(k) alanGiriş yap30 dkInput: a = [1, 7, 11], b = [2, 4, 6], k = 3Output: [[1, 2], [1, 4], [1, 6]]Başla
- ZorKayan pencere medyanı#two-heaps#lazy-deletion#sliding-windowO(n log n) zamanO(n) alanGiriş yap45 dkInput: nums = [1, 3, -1, -3, 5, 3, 6, 7], k = 3Output: [1.0, -1.0, -1.0, 3.0, 5.0, 6.0]Başla
- OrtaEn sık geçen k değer#top-k#min-heap#hash-mapO(n + d log k) zamanO(d) alanGiriş yap25 dkInput: values = [4, 1, 4, 2, 1, 4, 3], k = 2Output: [4, 1]Başla
- OrtaSağdaki sonraki aralık#two-heaps#max-heapO(n log n) zamanO(n) alanGiriş yap30 dkInput: spans = [[3, 4], [2, 3], [1, 2]]Output: [-1, 0, 1]Başla
- Ortak. en küçük asal kesir#k-way-merge#min-heapO((n + k) log n) zamanO(n) alanGiriş yap30 dkInput: values = [1, 2, 3, 5], k = 3Output: [2, 5]Başla
- KolayHer girişten sonra ortadaki skor#two-heaps#streamingO(n log n) zamanO(n) alan20 dkInput: scores = [5, 15, 1, 3]Output: [5, 5, 5, 3]Başla
- KolayHer tekliften sonra alış-satış farkı#two-heaps#max-heap#min-heapO(n log n) zamanO(n) alan15 dkInput: quotes = [("buy", 100), ("sell", 105), ("buy", 102), ("sell", 104), ("buy", 99)]Output: [None, 5, 3, 2, 2]Başla
- OrtaEn sık geçen k kelime#top-k#min-heap#hash-mapO(n + m log k) zamanO(m) alanGiriş yap20 dkInput: words = ["red", "blue", "red", "green", "blue", "red"], k = 2Output: ["red", "blue"]Başla
- KolaySkor akışında k. en büyük#min-heap#top-k#data-streamO(n log k) zamanO(k) alan15 dkInput: k = 3, scores = [4, 5, 8, 2], then add 3, 5, 10, 9, 4Output: [4, 5, 5, 8, 8]Başla
- ZorHer pencereyi en ucuza eşitle#two-heaps#sliding-window#lazy-deletionO(n log n) zamanO(n) alanGiriş yap40 dkInput: nums = [1, 3, 2, 8, 5, 5], k = 3Output: [2, 6, 6, 3]Başla
Konu · Graflar
0 / 21 tamamlandı- OrtaAdaları say#dfs#flood-fill#grid-traversalO(rows · cols) zamanO(rows · cols) alanGiriş yap30 dkInput: [[1]]Output: 1Başla
- OrtaDers sırası mümkün mü#topological-sort#cycle-detectionO(n + p) zamanO(n + p) alanGiriş yap35 dkInput: n = 3, pairs = [[1, 0], [2, 1]]Output: TrueBaşla
- ZorWord Ladder adım sayısı#bfs#shortest-pathO(N · L² · 26) zamanO(N · L) alanGiriş yap45 dkInput: start = hit, target = cog, words = [hot, dot, dog, lot, log, cog]Output: 5Başla
- KolayKasabanın güvenilen yargıcı#degree-counting#directed-graphO(n + p) zamanO(n) alan15 dkInput: n = 2, trust = [[1, 2]]Output: 2Başla
- OrtaBir grafın deep copy'sini al#dfs#hash-mapO(V + E) zamanO(V) alanGiriş yap30 dkInput: a square: 1 - 2 - 3 - 4 - 1Output: a new square with the same four labels and the same four linksBaşla
- OrtaÇürümenin yayılma süresi#bfs#multi-source#grid-traversalO(rows · cols) zamanO(rows · cols) alanGiriş yap30 dkInput: [[0, 2]]Output: 0Başla
- Ortaİki renge bölünebilir mi#bfs#graph-colouringO(V + E) zamanO(V) alanGiriş yap30 dkInput: adj = [[1, 3], [0, 2], [1, 3], [0, 2]]Output: TrueBaşla
- OrtaSinyalin yayılma süresi#dijkstra#shortest-path#min-heapO((n + m) log m) zamanO(n + m) alanGiriş yap30 dkInput: n = 3, links = [(0, 1, 4)], source = 0Output: -1Başla
- OrtaAktarma sınırıyla en ucuz yolculuk#bellman-ford#shortest-pathO(k · (n + m)) zamanO(n) alanGiriş yap35 dkInput: n = 3, flights = [(0, 1, 5)], src = 0, dst = 2, k = 1Output: -1Başla
- ZorKarşılıklı erişim grupları#strongly-connected-components#dfsO(n log n + m) zamanO(n + m) alanGiriş yap45 dkInput: n = 5, edges = [(0, 1), (1, 2), (2, 0), (2, 3), (3, 4)]Output: [[0, 1, 2], [3], [4]]Başla
- ZorYükselen suda geçiş#union-find#minimum-spanning-tree#sortingO(rc log rc) zamanO(rc) alanGiriş yap45 dkInput: heights = [[7]]Output: 7Başla
- OrtaDöngülerden uzak düğümler#dfs#graph-colouring#cycle-detectionO(n + e) zamanO(n) alanGiriş yap30 dkInput: graph = [[1, 2], [2], [3], [], [5], [4], [3, 4]]Output: [0, 1, 2, 3]Başla
- KolayKarşılıklı takip çiftleri#adjacency-set#directed-graphO(n + m) zamanO(n + m) alan15 dkInput: n = 4, follows = [[0, 1], [1, 0], [1, 2], [2, 3], [3, 2], [0, 2]]Output: 2Başla
- ZorHer eve su ver#prim#virtual-nodeO((n + m) log(n + m)) zamanO(n + m) alanGiriş yap40 dkInput: wells = [3, 4, 2], pipes = [[1, 2, 1], [2, 3, 5]]Output: 6Başla
- ZorHer kasabayı bağlayan en az yol#strongly-connected-components#directed-graphO(n + r) zamanO(n + r) alanGiriş yap45 dkInput: n = 5, roads = [(0, 1), (1, 2), (2, 0), (3, 2), (3, 4)]Output: 2Başla
- KolayBuild adımlarını sırala#topological-sort#indegreeO(n + m) zamanO(n + m) alan20 dkInput: n = 4, deps = [[0, 1], [0, 2], [1, 3], [2, 3]]Output: [0, 1, 2, 3]Başla
- KolayWait-for graph'ta deadlock#cycle-detection#graph-colouring#topological-sortO(n + m) zamanO(n + m) alan20 dkInput: n = 4, waits = [[0, 1], [1, 2], [2, 0], [3, 0]]Output: TrueBaşla
- Kolayİki durak arasındaki en ucuz rota#dijkstra#min-heapO((n + m) log n) zamanO(n + m) alan20 dkInput: n = 5, roads = [[0, 1, 4], [0, 2, 1], [2, 1, 2], [1, 3, 1], [2, 3, 5], [3, 4, 3]], src = 0, dst = 4Output: 7Başla
- Kolayİndirimli yollarla en kısa yollar#bellman-ford#negative-edgesO(n · m) zamanO(n) alan20 dkInput: n = 4, roads = [[0, 1, 4], [0, 2, 5], [2, 1, -3], [1, 3, 2]], src = 0Output: [0, 2, 5, 4]Başla
- ZorUzaylı alfabesinin sırası#topological-sort#graph-from-constraintsO(L) zamanO(len(words)) alanGiriş yap40 dkInput: words = ["wrt", "wrf", "er", "ett", "rftt"]Output: "wertf"Başla
- KolayKilitli her odayı aç#dfs#reachabilityO(n + k) zamanO(n) alan15 dkInput: rooms = [[1], [2], [3], []]Output: TrueBaşla
Konu · Matris ve grid
0 / 14 tamamlandı- KolayAdanın çevresi#grid-scan#neighbour-checkO(rows · cols) zamanO(1) alan20 dkInput: grid = [[1]]Output: 4Başla
- OrtaSatırları ve sütunları sıfırla#grid-marking#in-placeO(rows · cols) zamanO(rows + cols) alanGiriş yap25 dkBaşla
- OrtaSıralı grid'de ara#staircase-walk#grid-searchO(rows + cols) zamanO(1) alanGiriş yap25 dkInput: same grid, target = 10Output: NoneBaşla
- KolayBağlı bölgeyi yeniden boya#flood-fill#dfsO(rows · cols) zamanO(rows · cols) alan15 dkInput: grid = [[5]], row = 0, col = 0, colour = 3Output: [[3]]Başla
- OrtaKare grid'i döndür#in-place#transpose-reverseO(n²) zamanO(1) alanGiriş yap20 dkInput: grid = [[7]]Output: [[7]]Başla
- ZorEn uzun tırmanış yolu#grid-dfs#memoizationO(rows · cols) zamanO(rows · cols) alanGiriş yap40 dkBaşla
- OrtaKenara değmeyen adalar#flood-fill#grid-traversalO(rows · cols) zamanO(rows · cols) alanGiriş yap30 dkInput: grid = [[1]]Output: 0Başla
- OrtaGrid'de en kısa açık yol#bfs#grid-traversal#shortest-pathO(rows · cols) zamanO(rows · cols) alanGiriş yap25 dkInput: grid = [[0]]Output: 0Başla
- ZorYalnız 1'lerden en büyük dikdörtgen#monotonic-stack#grid-scanO(rows · cols) zamanO(cols) alanGiriş yap45 dkInput: grid = [[1, 1, 0, 1, 1, 1]]Output: 3Başla
- KolayHer çaprazda aynı değer#matrix-indexing#diagonalsO(rows · cols) zamanO(1) alan15 dkInput: grid = [[1, 2, 3, 4], [5, 1, 2, 3], [9, 5, 1, 2]]Output: TrueBaşla
- OrtaHücrelerin sonraki nesli#eight-neighbours#in-place-encodingO(rows · cols) zamanO(1) alanGiriş yap25 dkInput: board = [[0, 1, 0], [0, 0, 1], [1, 1, 1], [0, 0, 0]]Output: [[0, 0, 0], [1, 0, 1], [0, 1, 1], [0, 1, 0]]Başla
- Ortaİki kıyıya da akan hücreler#reverse-flood-fill#multi-source-searchO(rows · cols · log(rows · cols)) zamanO(rows · cols) alanGiriş yap30 dkInput: heights = [[1, 2], [4, 3]]Output: [[0, 1], [1, 0], [1, 1]]Başla
- KolayEn büyük ada alanı#flood-fill#dfs#grid-traversalO(rows · cols) zamanO(rows · cols) alan15 dkInput: grid = [[1, 1, 0, 0], [1, 0, 0, 1], [0, 0, 1, 1], [0, 0, 1, 0]]Output: 4Başla
- KolayGrid'i spiral sırayla doldur#matrix-traversal#direction-turningO(rows · cols) zamanO(rows · cols) alan15 dkInput: rows = 3, cols = 3Output: [[1, 2, 3], [8, 9, 4], [7, 6, 5]]Başla
Konu · Union-find
0 / 12 tamamlandı- OrtaEyaletleri say#union-find#connected-componentsO(n² · α(n)) zamanO(n) alanGiriş yap25 dkInput: matrix = [[1, 1, 0], [1, 1, 0], [0, 0, 1]]Output: 2Başla
- OrtaRedundant Connection#union-find#cycle-detectionO(n · α(n)) zamanO(n) alanGiriş yap25 dkInput: edges = [[1, 2], [1, 3], [2, 3]]Output: [2, 3]Başla
- ZorE-postaya göre hesap birleştirme#union-find#hash-mapO(E log E) zamanO(E) alanGiriş yap45 dkInput: [["Jo", "a@x", "b@x"], ["Jo", "b@x", "c@x"], ["Kim", "d@x"]]Output: [["Jo", "a@x", "b@x", "c@x"], ["Kim", "d@x"]]Başla
- KolayErişilebilir çift kontrolü#union-find#connectivityO((n + m) · α(n)) zamanO(n) alan15 dkInput: n = 3, links = [[0, 1], [1, 2], [2, 0]], source = 0, target = 2Output: TrueBaşla
- OrtaTutarlı eşitlikler#union-find#two-phaseO(n) zamanO(1) alanGiriş yap25 dkInput: rules = ["a==b", "b!=a"]Output: FalseBaşla
- OrtaAynı çizgiyi paylaşan taşlar#union-find#connected-componentsO(n · α(n)) zamanO(n) alanGiriş yap30 dkInput: stones = [[0, 0], [0, 1], [1, 0], [1, 2], [2, 1], [2, 2]]Output: 5Başla
- OrtaHerkesin bağlandığı en erken an#union-find#sort-by-timeO(m log m + m · α(n)) zamanO(n + m) alanGiriş yap25 dkInput: n = 5, logs = [[20, 0, 1], [3, 3, 4], [5, 1, 2], [9, 2, 3], [12, 0, 3]]Output: 12Başla
- OrtaEn küçük eşdeğer string#union-find#stringsO(n + m) zamanO(m) alanGiriş yap25 dkInput: a = "parker", b = "morris", text = "parser"Output: "makkek"Başla
- Zorİki yolcu için fazla yollar#union-find#greedyO(m · α(n)) zamanO(n) alanGiriş yap45 dkInput: n = 4, roads = [[3, 1, 2], [3, 2, 3], [1, 1, 3], [1, 2, 4], [1, 1, 2], [2, 3, 4]]Output: 2Başla
- ZorOrtak çarpana göre en büyük grup#union-find#prime-factorsO(n · √max(nums)) zamanO(n) alanGiriş yap45 dkInput: nums = [4, 6, 15, 35]Output: 4Başla
- KolayKenarlar tek bir ağaç mı#union-find#cycle-detectionO(n · α(n)) zamanO(n) alan15 dkInput: n = 5, edges = [[0, 1], [0, 2], [0, 3], [1, 4]]Output: TrueBaşla
- OrtaHer kara eklemesinden sonra adalar#union-find#online-connectivity#gridO(k · α(m · n)) zamanO(k) alanGiriş yap30 dkInput: m = 3, n = 3, positions = [[0, 0], [0, 1], [1, 2], [2, 1]]Output: [1, 1, 2, 3]Başla
Konu · Aralıklar
0 / 13 tamamlandı- OrtaÖrtüşmeyi bitiren en az silme#intervals#greedyO(n log n) zamanO(n) alanGiriş yap25 dkInput: intervals = [[1, 2], [2, 3], [3, 4], [1, 3]]Output: 1Başla
- ZorEmployee Free Time#intervals#mergeO(n log n) zamanO(n) alanGiriş yap40 dkInput: schedules = [[[1, 2], [5, 6]], [[1, 3]], [[4, 10]]]Output: [[3, 4]]Başla
- OrtaAraç paylaşımı kapasitesi#intervals#sweep-lineO(n log n) zamanO(n) alanGiriş yap25 dkInput: trips = [(2, 1, 5), (3, 3, 7)], capacity = 4Output: FalseBaşla
- KolayHer toplantıya katıl#intervals#sortingO(n log n) zamanO(n) alan15 dkInput: meetings = [[0, 30], [5, 10], [15, 20]]Output: FalseBaşla
- KolayDeğerleri aralıklara sıkıştır#intervals#single-passO(n) zamanO(n) alan15 dkInput: nums = [0, 1, 2, 4, 5, 7]Output: ["0->2", "4->5", "7"]Başla
- OrtaÖrtüşen aralıkları birleştir#intervals#sorting#mergeO(n log n) zamanO(n) alanGiriş yap20 dkInput: spans = [[1, 3], [8, 10], [2, 6], [15, 18]]Output: [[1, 6], [8, 10], [15, 18]]Başla
- OrtaBir aralığı ekle ve birleştir#intervals#mergeO(n) zamanO(n) alanGiriş yap25 dkInput: spans = [[1, 2], [4, 6], [9, 10]], new = [5, 9]Output: [[1, 2], [4, 10]]Başla
- Ortaİki aralık listesinin kesişimi#intervals#two-pointersO(m + n) zamanO(m + n) alanGiriş yap25 dkInput: a = [[0, 2], [5, 10], [13, 23], [24, 25]], b = [[1, 5], [8, 12], [15, 24], [25, 26]]Output: [[1, 2], [5, 5], [8, 10], [15, 23], [24, 24], [25, 25]]Başla
- OrtaBaşkalarının kapsadığı aralıkları at#intervals#sort-by-startO(n log n) zamanO(n) alanGiriş yap20 dkInput: spans = [[1, 4], [3, 6], [2, 8]]Output: 2Başla
- OrtaÇifte rezervasyonsuz takvim#sorted-intervals#bisect-insert#half-open-intervalsO(n) zamanO(n) alanGiriş yap25 dkInput: book(10, 20), book(15, 25), book(20, 30)Output: [True, False, True]Başla
- OrtaHer balonu patlatan en az atış#intervals#greedy#sort-by-endO(n log n) zamanO(n) alanGiriş yap25 dkInput: balloons = [[10, 16], [2, 8], [1, 6], [7, 12]]Output: 2Başla
- OrtaHer toplantı için gereken oda sayısı#min-heap#sweep-line#sortingO(n log n) zamanO(n) alanGiriş yap20 dkInput: meetings = [(0, 30), (5, 10), (15, 20)]Output: 2Başla
- KolaySıralı aralıklardan bir aralık kes#interval-overlap#single-passO(n) zamanO(n) alan15 dkInput: spans = [[0, 2], [3, 4], [5, 7]], cut = [1, 6]Output: [[0, 1], [6, 7]]Başla
Konu · Bit manipülasyonu
0 / 14 tamamlandı- KolayBit sırasını ters çevir#bit-shifting#accumulatorO(1) zamanO(1) alan20 dkInput: value = 1Output: 2147483648Başla
- OrtaÜçlüler arasındaki tek değer#bit-counting#modular-arithmeticO(n) zamanO(1) alanGiriş yap30 dkInput: nums = [2, 2, 3, 2]Output: 3Başla
- KolayEksik değer#xor-cancel#single-passO(n) zamanO(1) alan20 dkInput: nums = [3, 0, 1]Output: 2Başla
- KolayFarklı bit sayısı#xor#bit-countingO(log max(a, b)) zamanO(1) alan15 dkInput: a = 1, b = 4Output: 2Başla
- KolayHer sayının 1 olan bitleri#bit-shifting#reuse-smaller-answerO(n) zamanO(n) alan20 dkInput: n = 5Output: [0, 1, 1, 2, 1, 2]Başla
- Ortaİki yalnız değer#xor-cancel#bit-partitionO(n) zamanO(1) alanGiriş yap30 dkInput: nums = [1, 2, 1, 3, 2, 5]Output: [3, 5]Başla
- KolayDördün kuvveti kontrolü#bitmask#power-of-twoO(1) zamanO(1) alan15 dkInput: n = 16Output: TrueBaşla
- KolayBit maskesiyle her alt küme#bitmask#subsetsO(n · 2ⁿ) zamanO(n · 2ⁿ) alan20 dkInput: items = ["a", "b"]Output: [[], ['a'], ['b'], ['a', 'b']]Başla
- OrtaEşit bitli yer değiştirmelerle sırala#popcount#adjacent-swapsO(n log m) zamanO(1) alanGiriş yap25 dkInput: nums = [6, 5, 3, 16, 8, 31]Output: TrueBaşla
- ZorHer düğümden geçen en kısa gezinti#bitmask#bfsO(n² · 2ⁿ) zamanO(n · 2ⁿ) alanGiriş yap45 dkInput: adj = [[1, 3, 4], [0, 2], [1, 3, 5], [2, 0], [0], [2]]Output: 6Başla
- OrtaArtı kullanmadan iki sayıyı topla#bitwise-add#carry-propagation#twos-complementO(1) zamanO(1) alanGiriş yap25 dkInput: a = 1, b = 2Output: 3Başla
- OrtaBir aralık boyunca bitwise AND#common-prefix#bit-shiftO(1) zamanO(1) alanGiriş yap20 dkInput: lo = 5, hi = 7Output: 4Başla
- OrtaOrtak harfi olmayan kelime çiftleri#bitmask#set-as-integerO(L + n²) zamanO(n) alanGiriş yap20 dkInput: words = ["abcw", "baz", "foo", "bar", "xtfn", "abcdef"]Output: 16Başla
- OrtaÇiftler arasındaki toplam bit farkı#bit-counting#per-bit-contributionO(n) zamanO(1) alanGiriş yap20 dkInput: nums = [4, 14, 2]Output: 6Başla
Konu · Matematik ve sayılar teorisi
0 / 13 tamamlandı- KolayFaktöriyelin sondaki sıfırları#factor-counting#mathO(log n) zamanO(1) alan20 dkInput: n = 5Output: 1Başla
- OrtaBir sınırın altındaki asallar#sieve#precomputationO(n log log n) zamanO(n) alanGiriş yap25 dkInput: limit = 10Output: 4Başla
- OrtaMod altında üs alma#fast-exponentiation#modular-arithmeticO(log exp) zamanO(1) alanGiriş yap25 dkInput: base = 2, exp = 10, mod = 1000Output: 24Başla
- KolayTekrarlı rakam toplamı#modular-arithmetic#mathO(1) zamanO(1) alan15 dkInput: n = 38Output: 2Başla
- Ortaİki sürahiyle ölç#gcd#mathO(log min(a, b)) zamanO(1) alanGiriş yap25 dkInput: a = 3, b = 5, t = 4Output: TrueBaşla
- OrtaAsal mod altında kombinasyon#combinatorics#modular-inverseO(min(k, n − k) + log p) zamanO(1) alanGiriş yap30 dkInput: n = 5, k = 2Output: 10Başla
- KolayBir listenin EKOK'u#gcd#lcmO(n log(max(nums))) zamanO(1) alan15 dkInput: nums = [4, 6, 10]Output: 60Başla
- OrtaKesri devirli ondalık olarak yaz#long-division#hash-mapO(den) zamanO(den) alanGiriş yap30 dkInput: num = 1, den = 6Output: "0.1(6)"Başla
- ZorGeniş bir aralıktaki asallar#segmented-sieve#sieveO((√hi + hi − lo) log log hi) zamanO(√hi + hi − lo) alanGiriş yap40 dkInput: lo = 10, hi = 30Output: 6Başla
- KolayPascal üçgeninin bir satırı#binomial-coefficients#multiplicative-formulaO(k) zamanO(k) alan15 dkInput: k = 3Output: [1, 3, 3, 1]Başla
- KolayGreatest Common Divisor of Strings#gcd#string-periodO(len(a) + len(b)) zamanO(len(a) + len(b)) alan15 dkInput: a = "ABCABC", b = "ABC"Output: "ABC"Başla
- OrtaTam dakikayı dolduran şarkı çiftleri#modular-arithmetic#remainder-countO(n) zamanO(1) alanGiriş yap20 dkInput: times = [30, 20, 150, 100, 40]Output: 3Başla
- OrtaDevasa üslü kuvvet#fast-exponentiation#modular-arithmeticO(len(b)) zamanO(1) alanGiriş yap25 dkInput: a = 2, b = [3]Output: 8Başla
Konu · Dinamik programlama
0 / 27 tamamlandı- KolayEn ucuz merdiven tırmanışı#bottom-up-dp#rolling-variablesO(n) zamanO(1) alan20 dkInput: cost = [10, 15, 20]Output: 15Başla
- OrtaEngelli grid'de yollar#grid-dp#bottom-up-dpO(rows · cols) zamanO(cols) alanGiriş yap30 dkInput: [[0]]Output: 1Başla
- OrtaCümleyi kelimelere ayır#bottom-up-dp#hash-setO(L³) zamanO(L) alanGiriş yap30 dkInput: text = applepen, words = [apple, pen]Output: TrueBaşla
- ZorBekleme süreli alım satım#state-machine-dp#rolling-variablesO(n) zamanO(n) alanGiriş yap45 dkInput: prices = [1, 2, 3, 0, 2]Output: 3Başla
- KolayEvleri ucuza boya#bottom-up-dp#rolling-variablesO(n) zamanO(1) alan20 dkInput: costs = [[7, 6, 2]]Output: 2Başla
- OrtaRakam mesajını çöz#bottom-up-dp#rolling-variablesO(n) zamanO(1) alanGiriş yap30 dkInput: digits = "226"Output: 3Başla
- OrtaFarklı BST şekilleri#bottom-up-dp#countingO(n²) zamanO(n) alanGiriş yap30 dkInput: n = 3Output: 5Başla
- ZorPara için balon patlat#interval-dp#bottom-up-dpO(n³) zamanO(n²) alanGiriş yap50 dkInput: values = [3, 1, 5, 8]Output: 167Başla
- KolayKomşu olmayan hasat#bottom-up-dp#rolling-variablesO(n) zamanO(1) alan20 dkInput: yields = [2, 7, 9, 3, 1]Output: 12Başla
- OrtaBir tutar için en az bozuk para#bottom-up-dp#unbounded-knapsackO(amount · len(coins)) zamanO(amount) alanGiriş yap30 dkInput: coins = [1, 4, 6], amount = 8Output: 2Başla
- OrtaEn uzun artan alt dizi#bottom-up-dp#subsequence-dpO(n²) zamanO(n) alanGiriş yap30 dkInput: nums = [4, 1, 3, 2, 5, 3, 6]Output: 4Başla
- OrtaKelimeler arası en az düzenleme#string-dp#bottom-up-dpO(len(a) · len(b)) zamanO(len(b)) alanGiriş yap35 dkInput: a = "carpet", b = "parrot"Output: 3Başla
- Zorİç içe zarflar#binary-search#patience-sorting#sortingO(n log n) zamanO(n) alanGiriş yap45 dkInput: envelopes = [[4, 5], [4, 6], [6, 7], [2, 3], [1, 1]]Output: 4Başla
- ZorÇubuğu en ucuza kes#interval-dp#bottom-up-dpO(m³) zamanO(m²) alanGiriş yap50 dkInput: length = 10, marks = [2, 4, 7]Output: 20Başla
- OrtaBir tutarı ödemenin yolları#unbounded-knapsack#bottom-up-dpO(k · amount) zamanO(amount) alanGiriş yap25 dkInput: coins = [2, 3, 5], amount = 10Output: 4Başla
- ZorEn kısa ortak üst diziyi kur#string-dp#subsequence-dpO(len(a) · len(b)) zamanO(len(a) · len(b)) alanGiriş yap45 dkInput: a = "tile", b = "style"Output: "stiyle"Başla
- OrtaLongest Palindromic Subsequence#lcs#2d-dpO(n²) zamanO(n) alanGiriş yap30 dkInput: s = "character"Output: 5Başla
- OrtaHedefi tutturan işaretler#0-1-knapsack#subset-countO(n · sum(nums)) zamanO(sum(nums)) alanGiriş yap30 dkInput: nums = [1, 2, 3, 4], target = 2Output: 2Başla
- ZorAğaçta en az gözcü#tree-dp#state-machineO(n) zamanO(h) alanGiriş yap45 dkInput: tree = 1, left 2, whose children are 3 and 4Output: 1Başla
- Zorİki arkadaşla pasta dilimleri#circular-dp#exact-count-dpO(n²) zamanO(n) alanGiriş yap45 dkInput: slices = [4, 1, 2, 8, 3, 5]Output: 13Başla
- OrtaKamyonete en değerli yük#unbounded-knapsack#bottom-up-dpO(W · len(crates)) zamanO(W) alanGiriş yap25 dkInput: W = 10, crates (weight, value) = [(3, 5), (4, 7), (6, 11)]Output: 18Başla
- OrtaEn dengeli iki takım#0-1-knapsack#subset-sumO(n · sum(ratings)) zamanO(sum(ratings)) alanGiriş yap30 dkInput: ratings = [5, 8, 13, 2]Output: 2Başla
- KolayTam tutar için hediye kartları#0-1-knapsack#subset-sumO(n · total) zamanO(total) alan20 dkInput: cards = [3, 34, 4, 12, 5, 2], total = 9Output: TrueBaşla
- KolaySınırsız bozuk parayla tam para üstü#unbounded-knapsack#bottom-up-dpO(len(coins) · amount) zamanO(amount) alan15 dkInput: coins = [4, 7], amount = 15Output: TrueBaşla
- KolayGrid boyunca en ucuz yol#grid-dp#2d-dpO(rows · cols) zamanO(rows · cols) alan20 dkInput: grid = [[1, 3, 1], [1, 5, 1], [4, 2, 1]]Output: 7Başla
- Kolayİki kelimeyi eşlemek için en az silme#lcs#string-dpO(m · n) zamanO(m · n) alan20 dkInput: a = "sea", b = "eat"Output: 2Başla
- Ortaİki string'i iç içe geçir#two-string-dp#rolling-rowO(len(a) · len(b)) zamanO(len(b)) alanGiriş yap30 dkInput: a = "aabcc", b = "dbbca", c = "aadbbcbcac"Output: TrueBaşla
Konu · Sistem tasarımı
0 / 8 tamamlandı- KolayToken bucket ile rate limiter#token-bucket#integer-mathO(n) zamanO(n) alan15 dkInput: capacity = 2, per_second = 1, times_ms = [0, 0, 0, 500, 1000, 3000]Output: [True, True, False, False, True, True]Başla
- KolayYazma quorum'una göre okuma quorum'u#quorum#pigeonholeO(1) zamanO(1) alan10 dkInput: n = 3, w = 2Output: (2, 1)Başla
- OrtaConsistent hashing halkası#consistent-hashing#virtual-nodes#bisectO(log p) zamanO(p) alanGiriş yap25 dkInput: nodes = db-a, db-b, db-c; owner("user:42") before and after db-d joinsOutput: db-c db-cBaşla
- OrtaBloom filter boyutlandırma#bloom-filter#double-hashingO(k) zamanO(m) alanGiriş yap25 dkInput: n = 1000, p = 0.01Output: (9586, 7)Başla
- OrtaLeast-connections load balancer#least-connections#min-heap#event-simulationO(n (log n + s)) zamanO(n + s) alanGiriş yap25 dkInput: servers = ["a", "b"], requests = [(0, 10), (1, 2), (2, 5), (3, 1), (4, 1)]Output: (['a', 'b', 'a', 'b', 'b'], {'a': 2, 'b': 1})Başla
- KolayNearest rank ile gecikme yüzdelikleri#percentiles#sortingO(n log n + q) zamanO(n) alan10 dkInput: latencies = [12, 15, 11, 13, 240, 14, 12, 16, 13, 12], ps = [50, 90, 99]Output: {50: 13, 90: 16, 99: 240}Başla
- OrtaMesaj kuyruğunda visibility timeout#message-queue#event-simulationO(p · m) zamanO(p + m) alanGiriş yap25 dkInput: messages = ["poison"], polls at 0, 10, 20 and 30 by "a", work = {"a": 99}, timeout = 10, max_receives = 3Output: ([(0, 'a', 'poison'), (10, 'a', 'poison'), (20, 'a', 'poison'), (30, 'a', None)], [], ['poison'])Başla
- OrtaBir trace'teki kritik yol#distributed-tracing#interval-union#tree-walkO(n log n) zamanO(n) alanGiriş yap25 dkInput: [("r", None, "api", 0, 50), ("p", "r", "search", 0, 50), ("q", "r", "ads", 10, 30)]Output: ({'ads': 20, 'api': 0, 'search': 50}, ['r', 'p'])Başla
Konu · Sistem tasarımı vakaları
0 / 4 tamamlandı- KolayURL kısaltıcı kapasite tahmini#capacity-estimation#back-of-the-envelopeO(log(total links)) zamanO(1) alan15 dkInput: new_per_day = 100_000_000, reads_per_write = 100, bytes_per_url = 500, years = 10, peak = 3Output: {'write_qps': 1158, 'read_qps': 115741, 'peak_read_qps': 347223, 'storage_tb': 182.5, 'code_length': 7}Başla
- OrtaAkış fan-out maliyeti#fan-out#cost-modelO(E + U) zamanO(E + U) alanGiriş yap25 dkInput: the same graph and posts, but only ann opens the feed, once a dayOutput: ({'push': 93, 'pull': 4, 'hybrid': 14}, 'pull')Başla
- OrtaAPI gateway için rate limit kademeleri#rate-limiting#sliding-window-logO(r log n) zamanO(n) alanGiriş yap25 dkInput: tiers = {"free": [(10, 1)]}, requests from "a" at 0, 9, 10, 19, 20Output: {'a': [3, 2]}Başla
- KolayHaber akışı için cache hit oranı#lru-cache#hit-ratioO(n) zamanO(c) alan15 dkInput: feed = ["a", "b", "c", "a", "b", "c"], capacity = 2Output: 0.0Başla
Konu · Yapay zekâ ve ML
0 / 8 tamamlandı- KolayTemperature ile softmax#softmax#numerical-stabilityO(v) zamanO(v) alan15 dkInput: logits = [2.0, 1.0, 0.1], temperature = 1.0Output: [0.659, 0.242, 0.099]Başla
- KolayKV cache bellek bütçesi#capacity-math#memory-estimateO(1) zamanO(1) alan10 dkInput: layers = 32, kv_heads = 32, head_dim = 128, tokens = 4096, batch = 1, 2 bytes per numberOutput: 2048.0Başla
- OrtaKosinüse göre en yakın belgeler#vector-math#partial-sortO(n · d + n log k) zamanO(n) alanGiriş yap20 dkInput: query = [2, 0, 0], k = 2, articles = b [1, 0, 0], a [3, 0, 0], c [0, 1, 0]Output: [('a', 1.0), ('b', 1.0)]Başla
- OrtaSohbeti context'e sığacak kadar kırp#token-budget#newest-firstO(t) zamanO(1) alanGiriş yap20 dkInput: budget = 100, system = 20, reserve = 25, turns = [10, 30, 10, 20, 15]Output: 2Başla
- ZorByte pair birleştirmelerini öğren#byte-pair-encoding#pair-countingO(m · L) zamanO(L) alanGiriş yap35 dkInput: words = {"low": 5, "lower": 2, "newest": 6, "widest": 3}, merges = 4Output: [('e', 's'), ('es', 't'), ('l', 'o'), ('lo', 'w')]Başla
- KolayInt8 quantization gidiş dönüşü#quantization#scale-and-roundO(n) zamanO(n) alan15 dkInput: [0.4, -2.54, 0.013, 1.0]Output: ([20, -127, 1, 50], 0.02, 0.007)Başla
- OrtaSpeculative decoding'de hedef geçişleri#speculative-decoding#draft-and-verifyO(n · k) zamanO(n) alanGiriş yap25 dkInput: prompt = ["the"], draft guesses "a" after "on" where the target says "the", k = 4, n = 8Output: (['cat', 'sat', 'on', 'the', 'cat', 'sat', 'on', 'the'], 2)Başla
- ZorInverted-file aramada recall#vector-search#inverted-file-index#recall-at-kO(n · c + c · q · n log n) zamanO(n + c) alanGiriş yap35 dkInput: the same vectors and centroids, queries = [(6, 1)], k = 2Output: [0.5, 1.0, 1.0]Başla
Konu · Low-level design
0 / 8 tamamlandı- KolayOtopark ücret hesaplayıcı#class-design#pricing-rules15 dkInput: same lot, fee("car", 26 * 60)Output: 26Başla
- KolayBozuk paralı otomat#class-design#state-machine15 dkInput: then insert(100), select("A1"), select("A1")Output: ['credit 125', 'vend A1, change 60', 'sold out']Başla
- OrtaSüre sınırlı LRU cache#ordered-dict#lazy-expiry#min-heapO(log n) zamanO(number of puts) alanGiriş yap30 dkInput: then get("a", now=10)Output: NoneBaşla
- OrtaTopic wildcard'lı event bus#observer#topic-matchingO(s · d) zamanO(s · d) alanGiriş yap25 dkInput: then unsubscribe(the audit token), publish("order.created", "o8")Output: 0Başla
- ZorBellek içi dosya sistemi#class-design#path-walk#invariantsGiriş yap35 dkInput: then read("/logs/app/today.txt"), size("/")Output: 'boot ok\nuser in\n' 23Başla
- KolayÖdemede en iyi indirim stratejisi#strategy-pattern#class-designO(p · c) zamanO(1) alan15 dkInput: cart = [("coffee", 1200, 3), ("mug", 900, 2)], all three promotionsOutput: ('buy 2 coffee get 1 free', 4200)Başla
- OrtaTarama sırasında asansör durakları#elevator-sweep#event-simulationO(F · p + r log r) zamanO(r) alanGiriş yap25 dkInput: start = 3, requests = [(0, 5), (0, 1), (1, 4), (6, 2)]Output: [(1, 4), (2, 5), (6, 1), (7, 2)]Başla
- ZorŞahı güvende tutan geçerli hamleler#board-model#move-generation#check-detectionO(P² · 27²) zamanO(P) alanGiriş yap35 dkInput: {"h8": "k", "g7": "Q", "f6": "K"}, black to moveOutput: ('checkmate', [])Başla
Konu · Eşzamanlılık
0 / 8 tamamlandı- KolayPaylaşılan sayaçta kayıp güncellemeler#race-condition#step-simulationO(s) zamanO(t) alan15 dkInput: threads = 2, schedule = [0, 0, 0, 1, 1, 1]Output: 2Başla
- Kolayİş yüküne göre thread pool boyutu#capacity-math#integer-ceilingO(1) zamanO(1) alan10 dkInput: cores = 8, utilization = 100, wait_ms = 90, compute_ms = 10Output: 80Başla
- OrtaWait-for graph'ta deadlock'lu thread'ler#wait-for-graph#cycle-detectionO(t + l) zamanO(t) alanGiriş yap25 dkInput: holds = {"a": "T1", "b": "T2"}, waits = {"T1": "b", "T2": "a"}Output: ['T1', 'T2']Başla
- OrtaSemafor arkasında başlama zamanları#min-heap#event-simulationO(n log p) zamanO(n) alanGiriş yap20 dkInput: permits = 2, jobs = [(0, 5), (1, 3), (2, 4), (3, 1)]Output: [0, 1, 4, 5]Başla
- ZorSınırlı buffer'da teslimler#bounded-queue#event-simulation#fifo-fairnessO(n) zamanO(n) alanGiriş yap35 dkInput: capacity = 1, calls = put P1 a, put P2 b, take C1, take C2, take C1, put P1 cOutput: ([('C1', 'a'), ('C2', 'b'), ('C1', 'c')], [])Başla
- KolayCAS döngüsünde yeniden denemeler#compare-and-swap#step-simulationO(s) zamanO(t) alan15 dkInput: start = 0, amounts = [5, 7], schedule = [0, 1, 0, 1, 1, 1]Output: (12, [0, 1])Başla
- OrtaTek event loop'ta bitiş zamanları#event-loop#min-heap#event-simulationO(s log n) zamanO(n) alanGiriş yap25 dkInput: [("api", 0, [2, 10, 1]), ("report", 1, [30]), ("ping", 3, [1])]Output: {'report': 32, 'ping': 33, 'api': 34}Başla
- OrtaDeadlock'u önleyen kilit sırası#lock-ordering#topological-sort#min-heapO(E + L log L) zamanO(E + L) alanGiriş yap25 dkInput: [["accounts", "ledger"], ["ledger", "audit"], ["accounts", "audit"]]Output: ['accounts', 'ledger', 'audit']Başla
Konu · SQL
0 / 15 tamamlandı- KolaySecond Highest Salary#scalar-subquery#aggregate10 dkInput: employee = [(1, "Ana", 300), (2, "Ben", 200), (3, "Cy", 100)]Output: [(200,)]Başla
- KolayBirden fazla kullanılan e-postalar#group-by#having10 dkInput: account = [(1, "a@x.io"), (2, "b@x.io"), (3, "a@x.io"), (4, "c@x.io"), (5, "b@x.io"), (6, "a@x.io")]Output: [("a@x.io", 3), ("b@x.io", 2)]Başla
- KolayHiç sipariş vermeyen müşteriler#left-join#anti-join15 dkBaşla
- KolayYöneticisinden fazla kazananlar#self-join15 dkInput: employee = [(1, "Ana", 120, None), (2, "Ben", 90, 1), (3, "Cleo", 130, 1), (4, "Dev", 95, 3), (5, "Finn", 100, 4)]Output: [("Cleo", 130, 120), ("Finn", 100, 95)]Başla
- OrtaOrtalama maaşı en yüksek departman#group-by#cte#tiesGiriş yap20 dkInput: employee = [(1, "Ana", "eng", 120), (2, "Cleo", "eng", 130), (3, "Dev", "ops", 95), (4, "Finn", "ops", 100), (5, "Gus", "hr", 70)]Output: [("eng", 125.0)]Başla
- OrtaDepartman başına en çok kazanan iki#window-function#top-n-per-groupGiriş yap25 dkInput: employee = [(1, "Ana", "eng", 120), (2, "Ben", "eng", 90), (3, "Cleo", "eng", 130), (4, "Dev", "ops", 95), (5, "Eve", "ops", 80), (6, "Finn", "ops", 100)]Output: [("eng", "Cleo", 130), ("eng", "Ana", 120), ("ops", "Finn", 100), ("ops", "Dev", 95)]Başla
- OrtaTek sorguda yazar kitap sayıları#n-plus-one#left-join#group-byGiriş yap20 dkBaşla
- OrtaHesap başına kümülatif bakiye#window-function#running-total#window-frameGiriş yap25 dkInput: txn = [(1, "A", "2026-09-01", 100), (2, "B", "2026-09-01", 50), (3, "A", "2026-09-02", -30), (4, "A", "2026-09-02", 20), (5, "B", "2026-09-03", -50)]Output: [("A", "2026-09-01", 100, 100), ("A", "2026-09-02", -30, 70), ("A", "2026-09-02", 20, 90),Başla
- OrtaArt arda üç gün giriş yapanlar#window-function#consecutive-rows#dedupeGiriş yap25 dkInput: login = [("kim", "2026-09-01"), ("kim", "2026-09-02"), ("kim", "2026-09-03"), ("lee", "2026-09-01"), ("lee", "2026-09-02"), ("lee", "2026-09-04")]Output: [("kim",)]Başla
- ZorDurum log'unu serilere indir#gaps-and-islands#window-function#row-numberGiriş yap35 dkInput: status_log = [("2026-09-01", "up"), ("2026-09-02", "up"), ("2026-09-03", "down"), ("2026-09-04", "up"), ("2026-09-05", "up")]Output: [("up", "2026-09-01", "2026-09-02", 2), ("down", "2026-09-03", "2026-09-03", 1), ("up", "2026-09-04", "2026-09-05", 2)]Başla
- OrtaArt arda üç kez aynı ölçüm#self-join#consecutive-rows#distinctGiriş yap20 dkInput: reading = [(1, 1), (2, 1), (3, 1), (4, 2), (5, 1), (6, 2), (7, 2)]Output: [(1,)]Başla
- OrtaHer departmanın en çok kazananı#correlated-subquery#max#tiesGiriş yap20 dkInput: employee = [(1, "Ana", "eng", 120), (2, "Ben", "eng", 150), (3, "Cy", "ops", 90), (4, "Dee", "ops", 80)]Output: [("eng", "Ben", 150), ("ops", "Cy", 90)]Başla
- OrtaHer ürünü almış müşteriler#group-by#having#count-distinctGiriş yap20 dkInput: product = [5, 6], purchase = [(1, 5), (2, 6), (3, 5), (3, 6), (1, 6)]Output: [(1,), (3,)]Başla
- ZorAydan aya elde tutulan kullanıcılar#cte#self-join#retentionGiriş yap35 dkInput: activity = [(1, "2026-01-05"), (1, "2026-01-20"), (2, "2026-01-09"), (1, "2026-02-02"), (3, "2026-02-14"), (2, "2026-03-01"), (3, "2026-03-30")]Output: [("2026-01", 2, 0), ("2026-02", 2, 1), ("2026-03", 2, 1)]Başla
- KolayÇeyreklik satışları sütunlara çevir#pivot#case-when#group-by15 dkInput: sales = [("east", 1, 100), ("east", 2, 50), ("west", 1, 70), ("east", 1, 30), ("west", 4, 20)]Output: [("east", 130, 50, 0, 0), ("west", 70, 0, 0, 20)]Başla