solutions.py – Telegram
Title: 102. Binary Tree Level Order Traversal
URL: leetcode
Level: Medium
#DFS
Title: 297. Serialize and Deserialize Binary Tree
URL: https://leetcode.com/problems/serialize-and-deserialize-binary-tree/
Level: Hard

Initially, it looked very difficult, as soon as I tried smth on my own and then watched solution from neetcode: https://neetcode.io/solutions/serialize-and-deserialize-binary-tree
Solution was very straightforward.

Ko'z qo'rqoq, qo'l botir.
#DFS #binary_tree
Backtracking problems are almost always implemented using a depth-first search (DFS) strategy — but not all DFS is backtracking, and not all DFS problems require pruning or reversal (which backtracking does).
Forwarded from Vohid Karimov
Advent of Code 2025 yaqinlashmoqda 🎉🚀

1-dekabrdan 12-dekabrgacha har kuni 2ta programming puzzle yechamiz. O'tgan yilgi AoC ham juda qiziq bo'lgandi va top o'rin olganlar bilan maroqli suxbat qilgan edik.

Bu yilgi sovrinlar:
1-o'rin: Pixel Buds Pro 2 — Bobosher Musurmonov tomonidan.
2-o'rin: Logitech MX Master 3S — Farrukh Atabekov tomonidan.
3-o'rin: 3ta kitob (Code, Flow, va Deep Work) — Jakhongir Rakhmonov va men tomonidan.

Va musobaqadan so'ng top 10 kishi bilan har yilgidek meetup tashkil qilamiz.

Join link: https://adventofcode.com/2025/leaderboard/private/view/2432563 (birinchi login qiling)
Kirish kodi: 2432563-8d25532c
Qoidalar: https://adventofcode.com/2025/about

Leaderboard'ga max 200 kishi qo‘shila oladi. Agar siz qo‘shilgani ulgurmagan bo‘lsangiz, xavotirlanmang. Masalalarni yechavering, men har 2-3 kunda nofaollarni leaderboard'dan olib tashlayman, qo‘shilgani yana imkoniyat bo‘ladi.

Cheating oldini olish uchun, musobaqa ohirida top 10talikdan proof of work so‘raladi. Ya’ni, puzzle'larni mustaqil ravishda ishlaganingizni isbotlab berishingiz kerak bo‘ladi.

Let's go 🚀🚀🚀
Title: 643. Maximum Average Subarray I
URL: leetcode
Level: EASY
#sliding_window
👍2
Title: 14. Longest Common Prefix
URL: leetcode
Level: EASY
Title: 739. Daily Temperatures
URL: leetcode
Level: Medium
Title: 1475. Final Prices With a Special Discount in a Shop
URL: leetcode
Level: Easy
#Monotonic_stack
`def merge_sort(arr):
if len(arr) <= 1:
return arr

mid = len(arr) // 2
left = merge_sort(arr[:mid])
right = merge_sort(arr[mid:])

return merge(left, right)


def merge(left, right):
result = []
i = j = 0

while i < len(left) and j < len(right):
if left[i] <= right[j]:
result.append(left[i])
i += 1
else:
result.append(right[j])
j += 1

result.extend(left[i:])
result.extend(right[j:])
return result

`

Python sampe code for Merge Sort.
Title: 1189. Maximum Number of Balloons
URL: leetcode
Level: Easy
1051. Height Checker
URL: leetcode
Level: Easy

Sorted with #counting_sort