Search results for #leetcodechallenge
🚀 Day 17 of my #LeetCodeChallenge Today’s problem: Water Bottles II 🥤 A twist on the classic — after every exchange, the cost increases by 1. 🧩 Approach Greedy simulation → Drink all initial bottles Exchange empties ASAP After each exchange, cost +1 ⚡ Complexity Time →…
🚀 Day 16 of my #LeetCodeChallenge Today’s problem: Water Bottles 🥤 Given initial bottles & an exchange rule, find the maximum bottles you can drink. 🧩 Approach Greedy simulation → Drink all bottles Exchange empties for new ones Repeat until no more exchanges ⚡ Complexity…
🚀 Day 15 of my #LeetCodeChallenge Today’s problem: Find Triangular Sum of an Array 🔢 Reduce array by replacing adjacent pairs with (a+b)%10 until one element remains. 🧩 Approach Simulation of the process step by step ⚡ Complexity Time → O(n²) Space → O(n) ✨ Takeaways…
🚀 Day 14 of my #LeetCodeChallenge Today’s problem: Minimum Score Triangulation of Polygon 🔺 Split a convex polygon into triangles such that total score (product of vertices) is minimized. 🧩 Approach DP on intervals dp[i][j] = min(dp[i][k] + dp[k][j] + v[i]*v[k]*v[j]) ⚡…
1401 days of daily coding on @LeetCode — consistency is key! 🚀 Proud of this streak and excited to keep leveling up every day. #CodingJourney #LeetCodeChallenge #100DaysOfCode #DevCommunity #CodeEveryday
🚀 Day 13 of my #LeetCodeChallenge Today’s problem: Largest Perimeter Triangle 🔺 Given side lengths, find the max perimeter of a valid triangle. 🧩 Approach Sort sides Traverse from largest → smallest First valid triple (a+b>c) = max perimeter ⚡ Complexity Time → O(n log…
🚀 Day 12 of my #LeetCodeChallenge Today’s problem: Largest Triangle Area 🔺 Given points on a 2D plane, find the max possible triangle area. 🧩 Approach Use Shoelace Formula to compute area Try all triplets of points (O(n³), totally fine for n ≤ 50) Track the maximum area…
Day 11 of my #LeetCodeChallenge Today’s problem: 611. Valid Triangle Number 🔺 We need to count how many triplets (i, j, k) in an array can form valid triangles. Example: [2,2,3,4] → 3 [4,2,3,4] → 4 🧩 Approach Sort the array Fix the largest side c Use two pointers l & r to…
🚀 Day 10 of my #LeetCodeChallenge Today’s problem: 120. Triangle 🔺 We need to find the minimum path sum from top to bottom in a triangle. At each step, you can move to the same index or the next index in the row below. Example: [[2],[3,4],[6,5,7],[4,1,8,3]] → 11 🧩 Approach…
Week 3 of My LeetCode Challenge 🚀 This week, I focused deeper on binary search and solved medium-level problems like Search in Rotated Sorted Array. I used the pivot technique to handle rotation. #LeetCodeChallenge #BinarySearch #DSA
Today's #LeetCode Shortest Common Supersequence slayed! 🕵️♂️ Unraveled this DP like a murder mystery—strings merged, case closed! Grind’s relentless, let’s keep it movin! 😎 #CodingJourney #LeetCodeChallenge
Today's #LeetCode Edit Distance checked off! ✍️ Another DP win—tweaked those strings like a wordsmith. One must imagine Sisyphus happy, right? Head down, grind on! 😎 #CodingJourney #LeetCodeChallenge
Today's #LeetCode Longest Common Subsequence nailed! 🧬 Diving deeper into DP—drilled this one like striking oil in a coding rig. Let’s keep pumping those solutions! 😎 #CodingJourney #LeetCodeChallenge
Today's #LeetCode Coin Change II crushed! 🤑 Had a blast with this DP gem—counting combos like a kid in a candy store. Zooming through DP, what’s next? 😎 #CodingJourney #LeetCodeChallenge
Today's #LeetCode Coin Change sorted! 🪙 Tackled it with DFS and memoization. DP grind keeps chugging along! 😎 #CodingJourney #LeetCodeChallenge
Today's #LeetCode Partition Equal Subset Sum gave me a run for my money! 😅 Needed some help to crack this DP puzzle, but the grind don’t quit—here’s to nailing it solo next time! #CodingJourney #LeetCodeChallenge
Today's #LeetCode Triangle tackled! 🔺 Crushed this DP classic—zigzagged through the rows like a pro. The grind’s unstoppable, onto the next summit! 😎 #CodingJourney #LeetCodeChallenge
Today's #LeetCode Minimum Path Sum conquered! 🚪 Another DP win—navigated that grid like a champ to find the cheapest path. Timeline’s poppin’, let’s keep the grind going! 😎 #CodingJourney #LeetCodeChallenge
Today's #LeetCode Unique Paths smashed! 🚶♂️ Dove into DP to count all those grid paths. Grind’s going strong, onto the next! 😎 #CodingJourney #LeetCodeChallenge