Day 41/45 of the #SDESheetChallenge ✅
📌 Solved:
• Construct BST from Preorder
• Validate BST
• LCA in BST
• Inorder Successor & Predecessor
Learning: The more I understand the BST property, the less work my algorithms have to do.
#DSA#SDESheetChallenge#LeetCode
Day 40/45 of the #SDESheetChallenge ✅
📌 Solved:
• Populating Next Right Pointers
• Search in BST
• Construct BST from Keys
Learning: A Binary Search Tree isn't just a tree. Its ordering is what makes searching efficient.
#DSA#SDESheetChallenge#LeetCode
Day 39/45 of the #SDESheetChallenge ✅
📌 Solved:
• Symmetric Binary Tree
• Flatten Binary Tree
• Children Sum Property
Learning: Tree problems aren't always about traversal. Sometimes they're about validating or transforming the structure itself.
#DSA#LeetCode
Day 38/45 of the #SDESheetChallenge ✅
📌 Solved:
• Maximum Path Sum
• Construct BT from Preorder & Inorder
• Construct BT from Postorder & Inorder
Learning: Recursion isn't just about reaching the leaf nodes. It's about knowing what information to bring back.
#DSA#LeetCode
Fun fact: OpenAI handles 800 million users on ChatGPT with just one PostgreSQL primary and 50 read replicas 🤯
Today, OpenAI published an engineering blog explaining how they scaled their Postgres setup to support a massive 800 million users using a single primary and 50 multi-region replicas.
They dive into details around their scaling approach, the PgBouncer proxy, cache locking, and cascading read replicas. It is genuinely neat and impressive.
Some time back, I published a video on my YouTube channel where I dissected the blog and broke down the nuances.
Give it a watch - it is short and fun.
Day 37/45 of the #SDESheetChallenge ✅
Solved:
• LCA in Binary Tree
• Identical Trees
• Zig Zag Traversal
• Boundary Traversal
Learning: Tree problems become much easier when you focus on the relationships between nodes instead of treating them individually.
#DSA#LeetCode
Day 36/45 of the #SDESheetChallenge ✅
📌 Solved:
• Level Order Traversal
• Maximum Depth
• Diameter of BT
• Balanced Binary Tree
Learning: Many tree problems look different, but they're often built on the same idea. Understanding the foundation makes the rest much easier.
Day 35/45 of the #SDESheetChallenge ✅
📌 Solved:
• Pre/In/Post in One Traversal
• Vertical Order Traversal
• Root to Leaf Paths
• Maximum Width of BT
Learning: Traversing a tree is only half the work. The real challenge is deciding what information to collect along the way.
Day 34/45 of the #SDESheetChallenge ✅
📌 Solved:
• Morris Preorder
• Left & Right View
• Top & Bottom View
Learning: Sometimes the data structure stays the same. The solution changes when you change your perspective.
#DSA#SDESheetChallenge#LeetCode
Day 33/45 of the #SDESheetChallenge ✅
📌 Solved:
• Inorder Traversal
• Preorder Traversal
• Postorder Traversal
• Morris Inorder Traversal
Learning: Sometimes a small change in the order of processing creates a completely different algorithm. #SDESheetChallenge#LeetCode
Day 32/45 of the #SDESheetChallenge ✅
📌 Solved:
• Valid Anagram
• Count and Say
• Compare Version Numbers
Learning: Sometimes the hardest part of a problem isn't the code. It's understanding every detail before you start coding.
#DSA#SDESheetChallenge#LeetCode
Day 31/45 of the #SDESheetChallenge ✅
📌 Solved:
• Z Algorithm
• KMP (LPS Array)
• Minimum Insertions to Make String Palindrome
Learning: Sometimes the fastest solution comes from doing the right preprocessing instead of repeating the same work.
#SDESheetChallenge#LeetCode
Day 30/45 of the #SDESheetChallenge ✅
📌 Solved:
• Implement ATOI / STRSTR
• Longest Common Prefix
• Rabin-Karp Algorithm
Learning: String problems aren't difficult because of the code. They're difficult because of the edge cases.
#DSA#SDESheetChallenge#LeetCode
Day 29 of the #SDESheetChallenge ✅
Solved:
• Reverse Every Word
• Longest Palindrome
• Roman to Integer
Some days are about speed. Today's set was about paying attention to the small details.
On to Day 30. 🚀
#DSA#Java#LeetCode#Striver#takeUforward
Day 28/45 of the #SDESheetChallenge ✅
📌 Solved:
• Stock Span Problem
• Maximum of Minimums
• Celebrity Problem
Learning: Many optimizations begin by reusing information instead of calculating the same thing repeatedly.
#DSA#SDESheetChallenge#LeetCode
Day 27/45 of the #SDESheetChallenge ✅
📌 Solved:
• Largest Rectangle in Histogram
• Sliding Window Maximum
• Min Stack
• Rotten Oranges
Learning: Solving the problem is easier once you recognize the pattern and choose the right data structure.
#SDESheetChallenge#LeetCode