Sumit G

409 posts

Sumit G banner
Sumit G

Sumit G

@DevSumitG

💻 SWE @ Bad Posture Factory sometime write in python code.lift.weight

India Se unió Aralık 2022
99 Siguiendo18 Seguidores
Sumit G
Sumit G@DevSumitG·
Day 82 🔥 Find Median from Data Stream Two heaps: left (max), right (min) Keep them balanced → median easy. Smart data organization > brute force. #LeetCode #Python #DSA
Sumit G tweet media
English
0
0
2
5
Sumit G
Sumit G@DevSumitG·
Day 81 🔥 K Closest Points to Origin Min heap + squared distance (no sqrt) Small trick → cleaner solution. #LeetCode #Python #DSA
Sumit G tweet media
English
0
0
2
10
Sumit G
Sumit G@DevSumitG·
Day 80 🔥 Kth Largest Element Max heap: pop k-1 times → next is answer Same problem. Different approach. #LeetCode #Python #DSA
Sumit G tweet media
English
1
0
1
9
Sumit G
Sumit G@DevSumitG·
Day 79 🔥 Kth Largest Element Min heap with size k: push → if > k → pop Top = kth largest. Keep only what matters. #LeetCode #Python #DSA
Sumit G tweet media
English
0
0
1
6
Sumit G
Sumit G@DevSumitG·
Day 78 🔥 Last Stone Weight Max heap: pop two largest → push difference. Only one problem today. Still showed up. #LeetCode #Python #DSA
Sumit G tweet media
English
0
0
1
11
Sumit G
Sumit G@DevSumitG·
Day 77 🌳 Tree revision day. Level Order → BFS Right Side View → last node per level Validate BST → L < N < R Kth Smallest → inorder = sorted Good Nodes → max so far LCA (BST) → use BST property Balanced BT → height diff ≤ 1 Patterns repeating #LeetCode
Sumit G tweet media
English
0
0
1
17
Sumit G
Sumit G@DevSumitG·
Day 76 🌳 Subtree of Another Tree Serialize tree → include null markers Then compare strings. Structure matters, not just values. #LeetCode #Python #DSA
Sumit G tweet media
English
0
0
0
11
Sumit G
Sumit G@DevSumitG·
Day 75 🌳 Same Tree Used string serialization in Python. Tree → string → compare. Simple trick, clean solution. #LeetCode #Python #DSA
Sumit G tweet media
English
0
0
1
10
Sumit G
Sumit G@DevSumitG·
Day 74 🌳 Diameter of Binary Tree Idea: left depth + right depth = diameter through node Track max globally. Return height. Tree recursion patterns getting clearer. #LeetCode #Python #DSA
Sumit G tweet media
English
0
0
1
12
Sumit G
Sumit G@DevSumitG·
Day 73 🌳 Maximum Depth of Binary Tree BFS revision today. Depth = number of levels. Feels good revisiting tree basics. #LeetCode #Python #DSA
Sumit G tweet media
English
0
0
1
6
Sumit G
Sumit G@DevSumitG·
Day 72 🌳 Invert Binary Tree Busy week → revision day. Swap left & right nodes. Simple but good tree practice. #LeetCode #Python #DSA
Sumit G tweet mediaSumit G tweet media
English
0
0
0
8
Sumit G
Sumit G@DevSumitG·
Day 71 🔥 Last Stone Weight Max heap: pop two largest → push difference back. Simple idea. Good heap practice. #LeetCode #Python #DSA
Sumit G tweet media
English
0
0
0
5
Sumit G
Sumit G@DevSumitG·
Day 70 🔥 Kth Largest Element in a Stream Heap revision day. Min heap with only k elements. Smallest in heap = kth largest. One problem, clear concept. #LeetCode #Python #DSA
Sumit G tweet media
English
0
0
0
5
Sumit G
Sumit G@DevSumitG·
Day 69 🔥 Find Median from Data Stream Hard problem — but a great heap lesson. Two heaps: max heap (left) min heap (right) Balance them → median becomes easy. Needs revision. #LeetCode #Python #DSA
Sumit G tweet media
English
0
1
2
14
Sumit G
Sumit G@DevSumitG·
Day 68 🔥 Task Scheduler Max heap + queue pattern. Concept was tricky. Tried hard → eventually watched solution. Some problems require deeper understanding. #LeetCode #Python #DSA
Sumit G tweet media
English
0
0
1
7
Sumit G
Sumit G@DevSumitG·
Day 67 🔥 K Closest Points — trick: no sqrt, use squared distance + heap Design Twitter — barely solved, edge cases are wild Some problems test algorithms. Some test thinking. #LeetCode #Python #DSA
Sumit G tweet mediaSumit G tweet media
English
0
0
0
8
Sumit G
Sumit G@DevSumitG·
Day 66 🔥 Kth Largest Element in a Stream Priority Queue practice today. First solution → TLE Lesson: keep only K elements in heap. PQ problems = TC matters a lot. #LeetCode #Python #DSA
Sumit G tweet media
English
0
0
0
8
Sumit G
Sumit G@DevSumitG·
Day 65 🔥 Kth Largest Element — TLE taught me more than success Repeated heapify = bad idea Learned heap sort basics + solved one easy using it Efficiency > brute force. #LeetCode #Python #DSA
Sumit G tweet media
English
0
0
1
6
Sumit G
Sumit G@DevSumitG·
Day 64 🔥 Last Stone Weight Meetings all day. Still solved my first heap question. Max heap + edge cases handled. Heap journey begins. #LeetCode #Python #DSA
Sumit G tweet media
English
0
0
1
4
Sumit G
Sumit G@DevSumitG·
Day 63 🌳➡️📚 Kth Smallest in BST — inorder = sorted clarity Started learning Heap / Priority Queue: • Min vs Max heap • heapq in Python • push / pop / peek New topic unlocked. #LeetCode #Python #DSA
Sumit G tweet media
English
0
0
2
12