#monotonicstack 搜尋結果
Solved the Stock Span Problem using a Monotonic Decreasing Stack 💪. Efficiently computed spans in O(n) by storing indices instead of values! 📈🔥 #DSA #Stack #MonotonicStack #CodingJourney @harshbhaiyaa @ankurdotio @sheryians_
Solved Next Greater Element I using a 🔁 monotonic decreasing stack! Preprocessed nums2 in O(n), mapped next greater, and answered nums1 in O(1) lookups. From brute to beauty. 😎 #JavaScript #LeetCode #MonotonicStack #DSA #100DaysOfCode
LeetCode 84: Largest Rectangle in Histogram 📊 Each bar’s height × its width = possible rectangle area. Track the max area while popping from the stack 🔥 ⏱️ O(n) time — elegant and efficient! #LeetCode #DSA #MonotonicStack #Coding
Surprise triple header today! Adding: 3. Next Greater Element 📈 The monotonic stack trifecta is complete! Key points: Stack to track elements Pop when we find a greater element Efficient O(n) solution 💪 #CodingChallenge #DSA #MonotonicStack #ProblemSolving
🔥 Day 21 | Stock Span Problem 🚀 Used Stack to efficiently track previous greater elements, achieving O(N) time. Learned how to handle stock price comparisons smartly. #ProblemSolving #Stack #MonotonicStack #CodingJourney #KeepGrinding
🧵 Day 301 of #geekstreak2025 ✅ GFG POTD: Sum of Subarray Minimums 🧠 Used monotonic stack to find previous and next smaller elements. Each element’s contribution = val × (# of subarrays where it’s the min). Clean math, powerful stack. 🔁 #dsa #monotonicstack #array #math
Day 82: 365 Days of DSA Challenge 💡 Problem: Sum of Subarray Minimums - Time Complexity: O(N), where N is the length of the array. - Space Complexity: O(N) for the stack and result storage. #365DaysOfDSA #MonotonicStack #ProblemSolving
LeetCode 84: Largest Rectangle in Histogram 📊 Each bar’s height × its width = possible rectangle area. Track the max area while popping from the stack 🔥 ⏱️ O(n) time — elegant and efficient! #LeetCode #DSA #MonotonicStack #Coding
1️⃣ DSA – Stack Problems 🔸 Next Greater Element I 🔗 leetcode.com/problems/next-… 📌 Approach: • Use stack + map • Traverse from right → track next greater using stack • Map results for nums1 #DSA #Stack #MonotonicStack
Solved Next Greater Element I using a 🔁 monotonic decreasing stack! Preprocessed nums2 in O(n), mapped next greater, and answered nums1 in O(1) lookups. From brute to beauty. 😎 #JavaScript #LeetCode #MonotonicStack #DSA #100DaysOfCode
📉 Previous Smaller Element — Solved optimally in O(n) using a Monotonic Stack. A foundational pattern for problems like Histogram, Stack Span (in reverse), and more. 🔗LeetCode-style approach #MonotonicStack #Leetcode #DSAinCPP #LearningJourney
Solved the Stock Span Problem using a Monotonic Decreasing Stack 💪. Efficiently computed spans in O(n) by storing indices instead of values! 📈🔥 #DSA #Stack #MonotonicStack #CodingJourney @harshbhaiyaa @ankurdotio @sheryians_
🧵 Day 301 of #geekstreak2025 ✅ GFG POTD: Sum of Subarray Minimums 🧠 Used monotonic stack to find previous and next smaller elements. Each element’s contribution = val × (# of subarrays where it’s the min). Clean math, powerful stack. 🔁 #dsa #monotonicstack #array #math
Solved Next Greater Element I using a 🔁 monotonic decreasing stack! Preprocessed nums2 in O(n), mapped next greater, and answered nums1 in O(1) lookups. From brute to beauty. 😎 #JavaScript #LeetCode #MonotonicStack #DSA #100DaysOfCode
Surprise triple header today! Adding: 3. Next Greater Element 📈 The monotonic stack trifecta is complete! Key points: Stack to track elements Pop when we find a greater element Efficient O(n) solution 💪 #CodingChallenge #DSA #MonotonicStack #ProblemSolving
LeetCode 84: Largest Rectangle in Histogram 📊 Each bar’s height × its width = possible rectangle area. Track the max area while popping from the stack 🔥 ⏱️ O(n) time — elegant and efficient! #LeetCode #DSA #MonotonicStack #Coding
🔥 Day 21 | Stock Span Problem 🚀 Used Stack to efficiently track previous greater elements, achieving O(N) time. Learned how to handle stock price comparisons smartly. #ProblemSolving #Stack #MonotonicStack #CodingJourney #KeepGrinding
Day 82: 365 Days of DSA Challenge 💡 Problem: Sum of Subarray Minimums - Time Complexity: O(N), where N is the length of the array. - Space Complexity: O(N) for the stack and result storage. #365DaysOfDSA #MonotonicStack #ProblemSolving
💡 Day 92: Next Greater Element 🚀 🔹 Given an array, find the next greater element (NGE) on the right. 🔹 Approaches: ✅ Stack-based (O(N), efficient). ✅ Brute force (O(N²), slow). 🔹 Use Cases: ✔️ Stock span ✔️ #GfG160 #MonotonicStack #DSA #NextGreaterElement
Something went wrong.
Something went wrong.
United States Trends
- 1. Auburn 33.6K posts
- 2. Bama 25.8K posts
- 3. #SurvivorSeries 166K posts
- 4. Duke 25.2K posts
- 5. Cam Coleman 1,396 posts
- 6. Iron Bowl 12.5K posts
- 7. Austin Theory 3,702 posts
- 8. Ty Simpson 3,320 posts
- 9. #RollTide 4,417 posts
- 10. Virginia 46.8K posts
- 11. Ryan Williams 1,530 posts
- 12. Seth 20.5K posts
- 13. ACC Championship 5,148 posts
- 14. DeBoer 4,313 posts
- 15. Miami 108K posts
- 16. Stockton 8,092 posts
- 17. Lane Kiffin 39.2K posts
- 18. Horton 3,342 posts
- 19. Ole Miss 31.2K posts
- 20. Roman 47.9K posts