🇺🇿O'zbek tilida
Hammaga salom! Bugun yakshanba, tashqarida yomg'ir yog'moqda. Oldingi mavzulardan birini tiklaymiz: DFS rekursiv aylanib o'tish. Men bunday muammolarni yechish uchun foydalanadigan asosiy yondashuvni bergan edim [link] va siz uni quyidagi muammoga osongina qo'llashingiz mumkin. Keling buni bajaramiz!
Masala: 112. Path Sum
Mening yechimim: Solution
Natijalaringizni bilan bo'lishing - kimning yechimi tezroq ekanligini ko'raylik😁
Hammaga salom! Bugun yakshanba, tashqarida yomg'ir yog'moqda. Oldingi mavzulardan birini tiklaymiz: DFS rekursiv aylanib o'tish. Men bunday muammolarni yechish uchun foydalanadigan asosiy yondashuvni bergan edim [link] va siz uni quyidagi muammoga osongina qo'llashingiz mumkin. Keling buni bajaramiz!
Masala: 112. Path Sum
Mening yechimim: Solution
Natijalaringizni bilan bo'lishing - kimning yechimi tezroq ekanligini ko'raylik😁
Telegram
LeetCodin
🇺🇿O'zbek tilida
Hammaga salom! Bugun men Fibonachchi raqamlari uchun optimallashtirilgan algoritmi haqida yozmoqchiman.
Yondashuv quyidagicha: yig'indini hisoblash uchun rekursiyadan foydalanish va xar bir yig'indi uchun holatlarni saqlash - memoization.…
Hammaga salom! Bugun men Fibonachchi raqamlari uchun optimallashtirilgan algoritmi haqida yozmoqchiman.
Yondashuv quyidagicha: yig'indini hisoblash uchun rekursiyadan foydalanish va xar bir yig'indi uchun holatlarni saqlash - memoization.…
🔥9👍4
Which data structure do you want me to cover?
Anonymous Poll
36%
Array
32%
List
36%
Queue
32%
Stack
50%
Hash table
54%
Binary tree
46%
Trie
39%
Other graph
Qaysi Data structure ni ko’rib chiqishimni xohlaysiz?
Anonymous Poll
40%
Array (massiv)
32%
List (ro’yxat)
36%
Queue (navbat)
33%
Stack
45%
Hash table (xeshlangan jadval)
57%
Binary tree (ikki tugunli daraxt)
43%
Trie
27%
Boshqa data structure
🇬🇧Binary Tree: Inorder Traversal
🇺🇿O'zbekchasi pastda⬇️
Hi, guys! Thanks for your answers to the poll I shared yesterday. It's obvious that all data structures need to be overviewed and we will start from Binary Tree since it was the top choice.
I hope that one day we will fully review this data structure online later. Today I want to draw your attention to Inorder Traversal of Binary Tree.
Basic idea of inorder traversal is:
1. Go to the left node (subtree)
2. Then go to the parent
3. Then go to the right node (subtree).
Let's pause here. Try to solve the problem on LeetCode just knowing the information above: 94. Binary Tree Inorder Traversal
Hint: try to use recursive method.
OK. I hope you were able to solve it. Here is more information on inorder traversal:
1. Article about inorder traversing
2. My solution on LeetCode.
I'll add animated image to demonstrate how a binary tree should be traversed.
🇺🇿O'zbekchasi pastda⬇️
Hi, guys! Thanks for your answers to the poll I shared yesterday. It's obvious that all data structures need to be overviewed and we will start from Binary Tree since it was the top choice.
I hope that one day we will fully review this data structure online later. Today I want to draw your attention to Inorder Traversal of Binary Tree.
Basic idea of inorder traversal is:
1. Go to the left node (subtree)
2. Then go to the parent
3. Then go to the right node (subtree).
Let's pause here. Try to solve the problem on LeetCode just knowing the information above: 94. Binary Tree Inorder Traversal
Hint: try to use recursive method.
OK. I hope you were able to solve it. Here is more information on inorder traversal:
1. Article about inorder traversing
2. My solution on LeetCode.
I'll add animated image to demonstrate how a binary tree should be traversed.
LeetCode
Binary Tree Inorder Traversal - LeetCode
Can you solve this real interview question? Binary Tree Inorder Traversal - Given the root of a binary tree, return the inorder traversal of its nodes' values.
Example 1:
Input: root = [1,null,2,3]
Output: [1,3,2]
Explanation:
[https://assets.lee…
Example 1:
Input: root = [1,null,2,3]
Output: [1,3,2]
Explanation:
[https://assets.lee…
👍4🔥3
🇺🇿 Binary Tree: Inorder Traversal (Inorder aylanib o'tish usuli)
Hammaga salom! Kecha so'rovnomaga bergan javoblaringiz uchun rahmat. Ko'rinib turibdiki, barcha ma'lumotlar tuzilmalari ko'rib chiqilishi kerak va biz Binary Tree-dan boshlaymiz, chunki bu top tanlov edi.
Umid qilamanki, bir kun biz ushbu ma'lumotlar tuzilmasini onlayn tarzda to'liq ko'rib chiqamiz, chunki buning uchun men avval yaxshilab tayyorlanishim kerak. Bugun esa men sizning e'tiboringizni Ikki tugunli (Binary Tree) daraxtning Inorder aylanib o'tish usuliga qaratmoqchiman.
Inorder usuli bilan daraxtni kesib o'tishning asosiy g'oyasi:
1. Chap tugunga o'ting (chap bola daraxt)
2. Keyin ona tugunga [parent node] boring
3. Keyin o'ng tugunga (o'ng bola daraxt) o'ting.
[Agar noto'g'ri tarjima qilgan bo'lsam, iltimos, comment qilib yozib yuboring🙈]
Keling, shu yerda to'xtab, yuqoridagi ma'lumotlarni bilib turib, LeetCode-dagi masalani yechishga harakat qilamiz: 94. Ikkilik daraxtning inorder tartibida o'tish
Maslahat: rekursiv usuldan foydalanib ko'ring.
OK. Umid qilamanki, siz masalani yecha oldingiz. Bu Inorder kesib o'tish haqida ko'proq ma'lumot:
1. Inorder tartibida kesib o'tish haqida maqola
2. LeetCode-da mening yechimim
Inorder aylanib o'tishni ko'rsatish uchun shu postni tagiga animatsiya qilingan rasm ham qo'yaman.
Hammaga salom! Kecha so'rovnomaga bergan javoblaringiz uchun rahmat. Ko'rinib turibdiki, barcha ma'lumotlar tuzilmalari ko'rib chiqilishi kerak va biz Binary Tree-dan boshlaymiz, chunki bu top tanlov edi.
Umid qilamanki, bir kun biz ushbu ma'lumotlar tuzilmasini onlayn tarzda to'liq ko'rib chiqamiz, chunki buning uchun men avval yaxshilab tayyorlanishim kerak. Bugun esa men sizning e'tiboringizni Ikki tugunli (Binary Tree) daraxtning Inorder aylanib o'tish usuliga qaratmoqchiman.
Inorder usuli bilan daraxtni kesib o'tishning asosiy g'oyasi:
1. Chap tugunga o'ting (chap bola daraxt)
2. Keyin ona tugunga [parent node] boring
3. Keyin o'ng tugunga (o'ng bola daraxt) o'ting.
[Agar noto'g'ri tarjima qilgan bo'lsam, iltimos, comment qilib yozib yuboring🙈]
Keling, shu yerda to'xtab, yuqoridagi ma'lumotlarni bilib turib, LeetCode-dagi masalani yechishga harakat qilamiz: 94. Ikkilik daraxtning inorder tartibida o'tish
Maslahat: rekursiv usuldan foydalanib ko'ring.
OK. Umid qilamanki, siz masalani yecha oldingiz. Bu Inorder kesib o'tish haqida ko'proq ma'lumot:
1. Inorder tartibida kesib o'tish haqida maqola
2. LeetCode-da mening yechimim
Inorder aylanib o'tishni ko'rsatish uchun shu postni tagiga animatsiya qilingan rasm ham qo'yaman.
LeetCode
Binary Tree Inorder Traversal - LeetCode
Can you solve this real interview question? Binary Tree Inorder Traversal - Given the root of a binary tree, return the inorder traversal of its nodes' values.
Example 1:
Input: root = [1,null,2,3]
Output: [1,3,2]
Explanation:
[https://assets.lee…
Example 1:
Input: root = [1,null,2,3]
Output: [1,3,2]
Explanation:
[https://assets.lee…
👍8
🇬🇧Binary Tree: Postorder Traversal
🇺🇿O'zbekchasi pastda⬇️
Hi, guys! Today we will have another post on Binary Tree traversal - Postorder Traversal.
Basic idea of postorder traversal is:
1. Go to the left node (subtree).
2. Then go to the right node (subtree).
3. Then go to the parent.
Let's pause here. Try to solve the problem on LeetCode just knowing the information above: 145. Binary Tree Postorder Traversal
Hint: try to use recursive method.
OK. I hope you were able to solve it. Here is more information on postorder traversal:
1. Article about postorder traversing
2. My solution on LeetCode.
I'll add animated image to demonstrate how a binary tree should be traversed.
🇺🇿O'zbekchasi pastda⬇️
Hi, guys! Today we will have another post on Binary Tree traversal - Postorder Traversal.
Basic idea of postorder traversal is:
1. Go to the left node (subtree).
2. Then go to the right node (subtree).
3. Then go to the parent.
Let's pause here. Try to solve the problem on LeetCode just knowing the information above: 145. Binary Tree Postorder Traversal
Hint: try to use recursive method.
OK. I hope you were able to solve it. Here is more information on postorder traversal:
1. Article about postorder traversing
2. My solution on LeetCode.
I'll add animated image to demonstrate how a binary tree should be traversed.
LeetCode
Binary Tree Postorder Traversal - LeetCode
Can you solve this real interview question? Binary Tree Postorder Traversal - Given the root of a binary tree, return the postorder traversal of its nodes' values.
Example 1:
Input: root = [1,null,2,3]
Output: [3,2,1]
Explanation:
[https://assets…
Example 1:
Input: root = [1,null,2,3]
Output: [3,2,1]
Explanation:
[https://assets…
🔥4👍1
🇺🇿 Binar daraxtni Postorder usuli bilan aylanib o'tish
(Binary Tree: Postorder Traversal)
Hammaga salom! Bugun Binar daraxtni (binary tree) ni aylanib o'tishning Postorder usulini ko'rib chiqamiz.
Postorder usuli bilan daraxtni kesib o'tishning asosiy g'oyasi:
1. Chap tugunga o'ting (chap bola daraxt).
2. Keyin o'ng tugunga (o'ng bola daraxt) o'ting.
3. Keyin ona tugunga [parent node] boring.
[Agar noto'g'ri tarjima qilgan bo'lsam, iltimos, comment qilib yozib yuboring🙈]
Keling, shu yerda to'xtab, yuqoridagi ma'lumotlarni bilib turib, LeetCode-dagi masalani yechishga harakat qilamiz: 145. Binary Tree Postorder Traversal
Maslahat: rekursiv usuldan foydalanib ko'ring.
OK. Umid qilamanki, siz masalani yecha oldingiz. Bu yerda esa Postorder kesib o'tish usuli haqida ko'proq ma'lumot:
1. Postorder kesib o'tish haqida maqola
2. LeetCode-da mening yechimim
Postorder aylanib o'tishni ko'rsatish uchun shu postni tagiga animatsiya qilingan rasm ham qo'yaman.
(Binary Tree: Postorder Traversal)
Hammaga salom! Bugun Binar daraxtni (binary tree) ni aylanib o'tishning Postorder usulini ko'rib chiqamiz.
Postorder usuli bilan daraxtni kesib o'tishning asosiy g'oyasi:
1. Chap tugunga o'ting (chap bola daraxt).
2. Keyin o'ng tugunga (o'ng bola daraxt) o'ting.
3. Keyin ona tugunga [parent node] boring.
[Agar noto'g'ri tarjima qilgan bo'lsam, iltimos, comment qilib yozib yuboring🙈]
Keling, shu yerda to'xtab, yuqoridagi ma'lumotlarni bilib turib, LeetCode-dagi masalani yechishga harakat qilamiz: 145. Binary Tree Postorder Traversal
Maslahat: rekursiv usuldan foydalanib ko'ring.
OK. Umid qilamanki, siz masalani yecha oldingiz. Bu yerda esa Postorder kesib o'tish usuli haqida ko'proq ma'lumot:
1. Postorder kesib o'tish haqida maqola
2. LeetCode-da mening yechimim
Postorder aylanib o'tishni ko'rsatish uchun shu postni tagiga animatsiya qilingan rasm ham qo'yaman.
LeetCode
Binary Tree Postorder Traversal - LeetCode
Can you solve this real interview question? Binary Tree Postorder Traversal - Given the root of a binary tree, return the postorder traversal of its nodes' values.
Example 1:
Input: root = [1,null,2,3]
Output: [3,2,1]
Explanation:
[https://assets…
Example 1:
Input: root = [1,null,2,3]
Output: [3,2,1]
Explanation:
[https://assets…
👍4
🇬🇧Binary Tree: Preorder Traversal
🇺🇿O'zbekchasi pastda⬇️
Hi, guys! Today we will have another post on Binary Tree traversal - Preorder Traversal.
Basic idea of preorder traversal is:
1. Go to the parent.
2. Then go to the left node (subtree).
3. Then go to the right node (subtree).
Let's pause here. Try to solve the problem on LeetCode just knowing the information above: 144. Binary Tree Preorder Traversal
Hint: try to use recursive method.
OK. I hope you were able to solve it. Here is more information on preorder traversal:
1. Article about preorder traversing
2. My solution on LeetCode.
I'll add animated image to demonstrate how a binary tree should be traversed.
🇺🇿O'zbekchasi pastda⬇️
Hi, guys! Today we will have another post on Binary Tree traversal - Preorder Traversal.
Basic idea of preorder traversal is:
1. Go to the parent.
2. Then go to the left node (subtree).
3. Then go to the right node (subtree).
Let's pause here. Try to solve the problem on LeetCode just knowing the information above: 144. Binary Tree Preorder Traversal
Hint: try to use recursive method.
OK. I hope you were able to solve it. Here is more information on preorder traversal:
1. Article about preorder traversing
2. My solution on LeetCode.
I'll add animated image to demonstrate how a binary tree should be traversed.
LeetCode
Binary Tree Preorder Traversal - LeetCode
Can you solve this real interview question? Binary Tree Preorder Traversal - Given the root of a binary tree, return the preorder traversal of its nodes' values.
Example 1:
Input: root = [1,null,2,3]
Output: [1,2,3]
Explanation:
[https://assets.l…
Example 1:
Input: root = [1,null,2,3]
Output: [1,2,3]
Explanation:
[https://assets.l…
👍4
🇺🇿 Binar daraxtni Preorder usuli bilan aylanib o'tish
(Binary Tree: Preorder Traversal)
Hammaga salom! Bugun Binar daraxtni (binary tree) ni aylanib o'tishning Preorder usulini ko'rib chiqamiz.
Preorder usuli bilan daraxtni kesib o'tishning asosiy g'oyasi:
1. Ona tugunga o'ting [parent node]
1. Keyin chap tugunga o'ting (chap bola daraxt).
2. Keyin esa o'ng tugunga (o'ng bola daraxt) o'ting.
Keling, shu yerda to'xtab, yuqoridagi ma'lumotlarni bilib turib, LeetCode-dagi masalani yechishga harakat qilamiz: 144. Binary Tree Preorder Traversal
Maslahat: rekursiv usuldan foydalanib ko'ring.
OK. Umid qilamanki, siz masalani yecha oldingiz. Bu yerda esa Preorder kesib o'tish usuli haqida ko'proq ma'lumot:
1. Preorder kesib o'tish haqida maqola.
2. LeetCode-da mening yechimim.
Preorder aylanib o'tishni ko'rsatish uchun shu postni tagiga animatsiya qilingan rasm ham qo'yaman.
(Binary Tree: Preorder Traversal)
Hammaga salom! Bugun Binar daraxtni (binary tree) ni aylanib o'tishning Preorder usulini ko'rib chiqamiz.
Preorder usuli bilan daraxtni kesib o'tishning asosiy g'oyasi:
1. Ona tugunga o'ting [parent node]
1. Keyin chap tugunga o'ting (chap bola daraxt).
2. Keyin esa o'ng tugunga (o'ng bola daraxt) o'ting.
Keling, shu yerda to'xtab, yuqoridagi ma'lumotlarni bilib turib, LeetCode-dagi masalani yechishga harakat qilamiz: 144. Binary Tree Preorder Traversal
Maslahat: rekursiv usuldan foydalanib ko'ring.
OK. Umid qilamanki, siz masalani yecha oldingiz. Bu yerda esa Preorder kesib o'tish usuli haqida ko'proq ma'lumot:
1. Preorder kesib o'tish haqida maqola.
2. LeetCode-da mening yechimim.
Preorder aylanib o'tishni ko'rsatish uchun shu postni tagiga animatsiya qilingan rasm ham qo'yaman.
LeetCode
Binary Tree Preorder Traversal - LeetCode
Can you solve this real interview question? Binary Tree Preorder Traversal - Given the root of a binary tree, return the preorder traversal of its nodes' values.
Example 1:
Input: root = [1,null,2,3]
Output: [1,2,3]
Explanation:
[https://assets.l…
Example 1:
Input: root = [1,null,2,3]
Output: [1,2,3]
Explanation:
[https://assets.l…
🔥2⚡1
🇬🇧Just wanted to share that two milestones were achieved this week:
1. My LeetCode rank reached a 5 digit number
2. Numbers of my solutions’ views exceeded 10 000.
🇺🇿Ikkita kichkina bosqichdan o’tganimni shu yerda bo’lishmoqchiman:
1. Mening LeetCode rankim 5 raqamli son bo’ldi.
2. LeetCode dagi mening yechimlarimni 10 000 marta ko’rishibdi.
Yay!🤩🥳🙌
1. My LeetCode rank reached a 5 digit number
2. Numbers of my solutions’ views exceeded 10 000.
🇺🇿Ikkita kichkina bosqichdan o’tganimni shu yerda bo’lishmoqchiman:
1. Mening LeetCode rankim 5 raqamli son bo’ldi.
2. LeetCode dagi mening yechimlarimni 10 000 marta ko’rishibdi.
Yay!🤩🥳🙌
🎉23🤩4👍2🔥1🏆1🍾1
🇬🇧Binary Tree: Solving problems
🇺🇿O'zbekchasi pastda⬇️
Hi, guys! Let's solve some problems regarding binary trees and what we covered in previous topics. So far we learnt how to traverse binary trees.
I've prepared two problems: one is easy and another is medium level. You can solve the first one by using one of the traversals (inorder, postorder, preorder). However, the second tasks requires you to build a binary tree. This problem might be more difficult, but it's great to challenge yourself and see how can you apply traversal to building a tree. I believe that you can solve it! Let's goooo!🔥🔥🔥
Problem 1 (easy): 700. Search in a Binary Search Tree
My solution: Solution
Problem 2 (medium): 109. Convert Sorted List to Binary Search Tree
My solution: Solution
You can share links to your solutions on LeetCode in the comments
🇺🇿O'zbekchasi pastda⬇️
Hi, guys! Let's solve some problems regarding binary trees and what we covered in previous topics. So far we learnt how to traverse binary trees.
I've prepared two problems: one is easy and another is medium level. You can solve the first one by using one of the traversals (inorder, postorder, preorder). However, the second tasks requires you to build a binary tree. This problem might be more difficult, but it's great to challenge yourself and see how can you apply traversal to building a tree. I believe that you can solve it! Let's goooo!🔥🔥🔥
Problem 1 (easy): 700. Search in a Binary Search Tree
My solution: Solution
Problem 2 (medium): 109. Convert Sorted List to Binary Search Tree
My solution: Solution
You can share links to your solutions on LeetCode in the comments
LeetCode
Search in a Binary Search Tree - LeetCode
Can you solve this real interview question? Search in a Binary Search Tree - You are given the root of a binary search tree (BST) and an integer val.
Find the node in the BST that the node's value equals val and return the subtree rooted with that node.…
Find the node in the BST that the node's value equals val and return the subtree rooted with that node.…
🔥4👍1
🇺🇿 Binar daraxtlar: Masalalar yechamiz
Hammaga salom! Keling, binar daraxtlarga oid ba'zi muammolarni, oldingi ko'rib chiqqan mavzulardan foydalangan holda, yechaylik. Hozirgacha biz binar daraxtlarni qanday kesib o'tishni o'rgandik.
Men ikkita masala tayyorladim: biri oson, ikkinchisi o'rta darajali. Birinchisini kesib o'tish usullardan birini (tartib, keyingi buyurtma, oldindan buyurtma) ishlatib yechsangiz bo'ladi. Biroq, ikkinchi vazifa binar daraxtni qurishni talab qiladi. Bu masala qiyinroq, lekin o'zingizni sinab ko'rish va daraxt qurishda qanday qilib kesib o'tish usulidan foydalanish mumkinligini sinab ko'rishingiz uchun juda ham yaxshi. Men bu muammoni yecha olishingizga ishonaman! Olg'a!🔥🔥🔥
1-masala (oson): 700. Search in a Binary Search Tree
Mening yechimim: Solution
2-masala (qiyinligi medium): 109. Convert Sorted List to Binary Search Tree
Mening yechgan usulim: Solution
Agar yechgan bo'lsangiz, kommentariyda bo'lishing.
Hammaga salom! Keling, binar daraxtlarga oid ba'zi muammolarni, oldingi ko'rib chiqqan mavzulardan foydalangan holda, yechaylik. Hozirgacha biz binar daraxtlarni qanday kesib o'tishni o'rgandik.
Men ikkita masala tayyorladim: biri oson, ikkinchisi o'rta darajali. Birinchisini kesib o'tish usullardan birini (tartib, keyingi buyurtma, oldindan buyurtma) ishlatib yechsangiz bo'ladi. Biroq, ikkinchi vazifa binar daraxtni qurishni talab qiladi. Bu masala qiyinroq, lekin o'zingizni sinab ko'rish va daraxt qurishda qanday qilib kesib o'tish usulidan foydalanish mumkinligini sinab ko'rishingiz uchun juda ham yaxshi. Men bu muammoni yecha olishingizga ishonaman! Olg'a!🔥🔥🔥
1-masala (oson): 700. Search in a Binary Search Tree
Mening yechimim: Solution
2-masala (qiyinligi medium): 109. Convert Sorted List to Binary Search Tree
Mening yechgan usulim: Solution
Agar yechgan bo'lsangiz, kommentariyda bo'lishing.
LeetCode
Search in a Binary Search Tree - LeetCode
Can you solve this real interview question? Search in a Binary Search Tree - You are given the root of a binary search tree (BST) and an integer val.
Find the node in the BST that the node's value equals val and return the subtree rooted with that node.…
Find the node in the BST that the node's value equals val and return the subtree rooted with that node.…
👍8
🇬🇧Binary Tree: Solving problems. Part 2
🇺🇿O'zbekchasi pastda⬇️
Hi, guys! It's Saturday! Yahoo!
So, we won't cover new topic today and will try to solve more problems related to binary trees.
These problems are a little bit tricky, but at the same time interesting.
I hope you will enjoy solving them.
Problem 1: 104. Maximum Depth of Binary Tree
My solution: Solution
Problem 2: 606. Construct String from Binary Tree
My solution: Solution
Don't forget to code everyday. Consistency is the key.
Have a good weekend🤜🤛
🇺🇿O'zbekchasi pastda⬇️
Hi, guys! It's Saturday! Yahoo!
So, we won't cover new topic today and will try to solve more problems related to binary trees.
These problems are a little bit tricky, but at the same time interesting.
I hope you will enjoy solving them.
Problem 1: 104. Maximum Depth of Binary Tree
My solution: Solution
Problem 2: 606. Construct String from Binary Tree
My solution: Solution
Don't forget to code everyday. Consistency is the key.
Have a good weekend🤜🤛
LeetCode
Maximum Depth of Binary Tree - LeetCode
Can you solve this real interview question? Maximum Depth of Binary Tree - Given the root of a binary tree, return its maximum depth.
A binary tree's maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf…
A binary tree's maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf…
👍4
Binar daraxt: Masalalar yechamiz. 2-qism
Hammaga salom! Bugun shanba - dam olish kuni! Yahoo!
Shunday qilib, biz bugun yangi mavzuni yoritmaymiz va binar daraxtlar bilan bog'liq ko'proq masalalarni yechishga harakat qilamiz.
Bu masalalar biroz qiyin, lekin shu bilan birga qiziqarli.
Umid qilamanki, siz ularni yechishdan zavqlanasiz.
1-masala: 104. Maximum Depth of Binary Tree
My solution: Solution
Problem 2: 606. Construct String from Binary Tree
My solution: Solution
Har kuni kod yozishni unutmang. Consistency is the key [buni endi tarjima qilishga sal qiynaldim].
Dam olish kuningiz xayrli o'tsin🤜🤛
Hammaga salom! Bugun shanba - dam olish kuni! Yahoo!
Shunday qilib, biz bugun yangi mavzuni yoritmaymiz va binar daraxtlar bilan bog'liq ko'proq masalalarni yechishga harakat qilamiz.
Bu masalalar biroz qiyin, lekin shu bilan birga qiziqarli.
Umid qilamanki, siz ularni yechishdan zavqlanasiz.
1-masala: 104. Maximum Depth of Binary Tree
My solution: Solution
Problem 2: 606. Construct String from Binary Tree
My solution: Solution
Har kuni kod yozishni unutmang. Consistency is the key [buni endi tarjima qilishga sal qiynaldim].
Dam olish kuningiz xayrli o'tsin🤜🤛
LeetCode
Maximum Depth of Binary Tree - LeetCode
Can you solve this real interview question? Maximum Depth of Binary Tree - Given the root of a binary tree, return its maximum depth.
A binary tree's maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf…
A binary tree's maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf…
👍2🔥2