LeetCodin
1.4K subscribers
160 photos
3 videos
2 files
303 links
LeetCode 1700+
πŸ‡ΊπŸ‡ΏπŸ‡ΊπŸ‡Έ
Motto: ПобСда Π»ΡŽΠ±ΠΈΡ‚ ΠΏΠΎΠ΄Π³ΠΎΡ‚ΠΎΠ²ΠΊΡƒ

- Getting ready for FAANG | FAANGga tayyorlanamiz
- Data Structures and Algorithms | Ma'lumotlar tuzilmalari va Algoritmlar
- SWE at Deloitte πŸ‡ΊπŸ‡Έ
- LeetCode: https://leetcode.com/tbekpro/
Download Telegram
This media is not supported in your browser
VIEW IN TELEGRAM
*I'm back 😁😁

πŸ‡¬πŸ‡§ Yesterday a certain number of new people joined the channel. Brief intro:

On this channel I try to explain Algorithms and Data Structures. Also, I solve the problems on LeetCode and analyze the solutions. πŸ§‘β€πŸ’»

πŸ‡ΊπŸ‡Ώ Kecha bir nechta yangi odam qo'shilibdi. Shuning uchun kichkina tanishuv:

Bu blogda Algoritmlar, Ma'lumot Tuzilmalari va LeetCode-da masalalarni yechib, yaxshilab tushuntirishga harakat qilaman.πŸ§‘β€πŸ’»

@leetcodin
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ”₯11πŸ‘4😁1
πŸ‡¬πŸ‡§ 669. Trim a Binary Search Tree

πŸ§‘β€πŸ’» Hi, guys! I haven't been posting regularly for about 3 weeks due to some reasons, but I didn't stop solving LeetCode problems. So, let's go and start with interesting Binary Search Tree problem.

🟑 Medium: 669. Trim a Binary Search Tree
πŸ§‘β€πŸ’» My solution: Java 100% Faster | 0ms BFS + DFS Solution

Your task is to trim given tree such a way that only nodes with values between given range are kept.

Good luck! ✌️🧐

@leetcodin
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘6❀1😁1
πŸ‡ΊπŸ‡Ώ 669. Trim a Binary Search Tree

πŸ§‘β€πŸ’» Hammaga salom! Regular tarzda post qilmaganimga 3 haftacha bo'libdi. Ammo LeetCode-dagi masalalarni har kuni yechayapman. Keling bugun Binar Qidiruv Daraxtiga oid masalani yechib ko'raylik.

🟑 O'rta daraja: 669. Trim a Binary Search Tree
πŸ§‘β€πŸ’» Mening yechimim: Java 100% Faster | 0ms BFS + DFS Solution

Sizning vazifangiz berilgan diapazonga kiruvchi qiymatlarga ega tugunlarni qoldirish va qolganlarini olib tashlash.

Omad! ✌️🧐

@leetcodin
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘8
Media is too big
VIEW IN TELEGRAM
Asr SIRI ochildi!

PHPni orqasida kim turganligini bilarmidingiz?
Ustoz
Qudrat Abdurahimov, bu sirni hammaga e'lon qildi😁

Gulla, yashna PHP!
πŸ‘26😁19πŸ’―2πŸ‘€2
Solving 1000 LeetCode problems - EASY!


If you read such a statement, don't believe it! πŸ˜‰

πŸš€ Today I'm celebrating 1000 LeetCode problems solved: a journey of dedication and growth! πŸš€

I am happy to share a significant milestone in my journey – I have successfully tackled 1000 challenging LeetCode problems! πŸŽ‰ This accomplishment has been the result of relentless dedication, countless early mornings, and a commitment to continuous growth.

πŸŒ… 400 Days of Consistency: Over the past 400 days, I made it a ritual to rise early and dedicate 1-2 hours daily to solving complex coding problems on LeetCode. This consistent effort has taught me the power of discipline and the incredible outcomes that can be achieved through small, focused actions over an extended period.

πŸ’‘ Lessons in Problem Solving: Each LeetCode problem I encountered was a unique puzzle, pushing me to think creatively, strategize meticulously, and embrace diverse problem-solving approaches. These challenges not only honed my technical skills but also enhanced my critical thinking and perseverance.

🌟 What's Next: As I celebrate this achievement, I am excited to leverage the skills and insights gained to take on even greater challenges. My journey in the world of coding is far from over, and I'm eager to continue exploring, learning, and contributing to the ever-evolving tech landscape.

#leetcode #codingJourney #milestoneachieved #neverstoplearning #techgrowth #dsa #java #programming
πŸ‘50πŸ”₯9❀7🀯6πŸ†5⚑3
πŸŽ‰ Milestone Alert! 1100 Problems Solved on LeetCode! πŸš€

🧠 Today marks a special day as I've just cracked my 1100th problem on LeetCode! The journey to this point has been both challenging and rewarding.

πŸ“Š Stats Breakdown for the Last 100 Problems:

Easy: 9
Medium: 86
Hard: 5

This translates to 91% of the problems being medium or hard! πŸ€“

πŸ† My previous best was solving 81% of such questions, so this is a new personal record!

πŸ”„ Change in Strategy:

Starting from 1001th problem I decided to shift from solving 2 problems daily to just 1. The reasons?
1️⃣ The problems are getting tougher and need more time.
2️⃣ I'm also diving into other learning areas and need to balance my time.

Proud to share that I've been consistently solving problems on LeetCode for almost 500 days straight! πŸ‹οΈβ€β™‚οΈ

This journey has been about growth, learning, and pushing boundaries. Here's to many more days of coding and problem-solving! πŸ™Œ

LeetCode

#java #leetcode #coding #dsa #programming πŸ–₯πŸ’‘πŸ“š
πŸ”₯24πŸ‘7❀1
πŸŽ‰ Yutuq E'loni! 🌟 LeetCode'da 1100 Muammo Yechdim! πŸš€

🧠 Bugun maxsus kun, chunki LeetCode'da 1100-muammoni yechdim! Bu nuqtaga yetib kelishim o'ziga xos qiyinchiliklar va mukofotlar bilan to'la bo'lgan.

πŸ“Š Oxirgi 100 Muammo Bo'yicha Statistika:

Oson: 9
O'rtacha: 86
Qiyin: 5

Bu, muammolarning 91% o'rtacha yoki qiyin darajada ekanligini anglatadi! πŸ€“

πŸ† Oldingi eng yaxshi natijam bu turdagi savollarni 81% yechish bo'lgan, demak bu yangi shaxsiy rekord!

πŸ”„ Strategiyada O'zgarish:

Kuniga 2 ta muammo yechish o'rniga endi faqat 1 tasini yechishga qaror qildim. Sababi?

1️⃣ Muammolar tobora murakkablashmoqda va ko'proq vaqt talab etmoqda.
2️⃣ Shuningdek, boshqa o'quv sohalariga sho'ng'iyapman va vaqtimni muvozanatlashim kerak.

Aytib o'tishim lozim bo'lgan shuki, LeetCode'da deyarli 500 kun davomida uzluksiz muammolarni yechib kelmoqdaman! πŸ‹οΈβ€β™‚οΈ

Bu safar o'sish, o'rganish va chegaralarni kengaytirish haqida bo'ldi. Kodlash va muammolarni yechishda ko'plab kunlarni kutib qolaman! πŸ™Œ

LeetCode

#java #leetcode #coding #dsa #programming πŸ–₯πŸ’‘πŸ“š

NB: Tarjimani ChatGPT4 bajardi ;)
😁26πŸ‘24πŸ”₯11❀2
LeetCode Yangi Yil bayramiga badge'lar tarqatayotgan ekan!
πŸŽ‰πŸŽ‰πŸŽ‰
🐎🚿

@leetcodin
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘25❀3πŸ”₯3
πŸ‡¬πŸ‡§ 1145. Binary Tree Coloring Game

🟑 Medium: 1145. Binary Tree Coloring Game
πŸ‘¨β€πŸ’» My solution: Java O(N) | 100% Faster Solution

πŸ‘¨β€πŸ’» Task
In this LeetCode problem, you're playing a turn-based game on a binary tree:

- Players alternate coloring connected nodes, starting with Player 1 (red) and then Player 2 (blue).
- The game ends when neither player can color any more nodes.
- Your task is to determine if you, as Player 2, can choose a starting node that ensures you color more nodes than Player 1. Return true if possible, otherwise false.

πŸ‘¨β€πŸ’» Solution
The idea of the solution is to count the number of all existing nodes, the number of nodes in the left subtree, and the number of nodes in the right subtree. These values will be stored in n, l, and r respectively.

And then, you have 3 cases when you can win:
- When the number of nodes in the left subtree is more than the rest: l > n - l.
- When the number of nodes in the right subtree is more than the rest: r > n - r.
- When the number of the chosen node and its children is less than the rest: l + r + 1 < n - l - r - 1.

To find the given node, you use the Depth First Search (DFS) method.
To find the number of nodes in the subtrees, you can also use DFS.

Good! Keep cracking the problems!
Cheers! ✌️😎

@leetcodin
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘2
πŸ‡ΊπŸ‡Ώ 1145. Binary Tree Coloring Game

🟑 O'rta daraja: 1145. Binary Tree Coloring Game
πŸ‘¨β€πŸ’» Mening yechimim: Java O(N) | 100% Faster Solution

πŸ‘¨β€πŸ’» Vazifa
Bu LeetCode masalasida, siz binar daraxtga asoslangan navbatma-navbat o'yin o'ynaysiz:

- O'yinchilar ulangan tugunlarni ranglashda navbatma-navbat ishtirok etishadi, avval 1-o'yinchi (qizil), so'ngra 2-o'yinchi (ko'k).
- Hech bir o'yinchi ko'proq tugunlarni ranglay olmaganda o'yin tugaydi.
- Sizning vazifangiz, 2-o'yinchi sifatida, 1-o'yinchidan ko'proq tugunlarni ranglaydigan boshlang'ich tugunni tanlash imkoniyatini aniqlash. Agar bu mumkin bo'lsa, true qaytaring, aks holda false.

πŸ‘¨β€πŸ’» Yechim
Yechim g'oyasi barcha mavjud tugunlar sonini, chap pastki daraxtning tugunlari sonini va o'ng pastki daraxtning tugunlari sonini hisoblashdan iborat. Bu qiymatlar mos ravishda n, l va r da saqlanadi.

Va keyin, siz yutishingiz mumkin bo'lgan 3 ta holat mavjud:
- Chap pastki daraxtdagi tugunlar soni qolgandan ko'p bo'lganda: l > n - l.
- O'ng pastki daraxtdagi tugunlar soni qolgandan ko'p bo'lganda: r > n - r.
- Tanlangan tugun va uning bolalarining soni qolgandan kam bo'lganda: l + r + 1 < n - l - r - 1.

Berilgan tugunni topish uchun siz Chuqurlikka Birinchi Izlash [findNode()] (DFS) usulidan foydalanishingiz mumkin.
Pastki daraxtlardagi tugunlar sonini topish uchun ham [countNodes()] DFS dan foydalanishingiz mumkin.

Yaxshi! Masalalarni yechishda davom eting!
Omad! ✌️😎

@leetcodin
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘8❀1
LeetCode Rewind 2023

@Leetcodin
πŸ”₯38⚑9πŸ‘2
Hammaga salom!

Blogda yangi misolni tanlash, tahlil qilish va post yozish mendan ko'p vaqt talab etayapti. Shuning uchun tajriba o'tkazib ko'rmoqchiman - yangi format kiritmoqchiman. Bu formatda regular tarzda nimalar o'rganganimni qisqacha yozib o'taman.

Bu formatni #progress deb atasam degan fikrdaman. Agar nomlash bo'yicha original fikrlaringiz bo'lsa - postning tagidagi izohlarga marhamat!

#progress
1. System design:
- Sharding qanday ishlashini high-level nazaridan o'rganib chiqdim;
- Caching strategy'lar qanday bo'lishini o'qidim;
- CQRS - bu nima savoliga javob topdim;
- Pull based va push based architecture'larning farqi nimada.

2. LeetCode
- https://leetcode.com/problems/reach-a-number - done βœ…

@LeetCodin
πŸ‘25❀2
Hammaga salom!

#progress
1. System Design:
- Cassandra va MongoDB'ning farqi va qaysi holatlarda ishlatilishi o'qib chiqdim - link
- Google Analytics kabi tizimini qanday qilib design qilish mumkin - link
- API Gateway va Load Balancer'ning farqi nimada? - link

2. LeetCode:
- Weekly Contest'da birinchi marta qatnashdim va 4ta masaladan 3ta (1ta oson va 2ta o'rta qiyinlikdagi) masalani yechishga ulgurdim.


πŸŽ„ Kirib kelayotgan Yangi 2024-yil muborak bo'lsin! πŸŽ„


P.S. Siz bugun qanday progress qildingiz?πŸ€”

@LeetCodin
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘29⚑5πŸ”₯4
Hammaga salom! πŸ‘‹

#progress
1. System Design:
- Youtube'da bitta zo'r System Design mock interview'ni topib oldim. Bu videoning zo'r tomoni shuki, interview olayotgan odam videoning oxirida o'zining feedback'ini beradi. Feedback'ning tuzilishi, qanday darajadan nimalar bilish va tushuntira olish kerakligini aytib o'tadi. Shu tarafdan juda ham foydali deb topdim. Havola -> Design Live Comments Feature: System Design Interview with a Meta Engineer

- Redis va Memcached cache'larning orasida nima farqlari bor. Va Google orqali topgan boshqa sahifalar.

2. LeetCode:
- Har kuni bittadan medium masalalarni yechishni davom etayapman.

P.S. Siz bugun qanday progress qildingiz?πŸ€”

@LeetCodin
Please open Telegram to view this post
VIEW IN TELEGRAM
⚑16πŸ‘8πŸ”₯3❀1