Back on LeetCode after a 2–3 month break — solved today’s Problem of the Day in one go.
I’m Ayush Kumar Rai, a Full Stack Web Developer and AIML student, getting back on track with DSA step by step.
Momentum matters more than streaks.
#AyushKumarRai#LeetCode#DSA
Just solved this Reverse Polish Notation (RPN) problem on LeetCode as part of X and Threads grind! 🧠🔥 It was all about using a stack to evaluate postfix expressions, and I got it accepted with 6ms runtime, beating over 72% 🚀.
Solved a really good sliding window problem today — it was the LeetCode Problem of the Day and coincidentally the same one I faced in a previous online assessment! 🔥 Super interesting logic and a neat reminder of how powerful the sliding window technique can be.
Tried solving Dijkstra’s algorithm 2-3 times with a basic approach but kept hitting TLE 😤. Finally optimized it using an adjacency list + priority queue, and boom — passed all test cases like a charm ✅🔥
Just casually solved the classic “Sort Characters by Frequency” LeetCode question—and bruh, it ran perfectly in one go 😭🔥! Used a Priority Queue, trusted the process, and boom—ACCEPTED! Moments like these really hit different 😌.
#ayushkumarrai
Solved today’s LeetCode Daily Challenge using a BFS-based approach where I generated all possible subsequences in lexicographical order and checked if they appear at least **k** times in the original string. Used a helper function to verify each candidate subsequence.
Learning Priority Queue and randomly gave a tukka solution to this one—and it actually worked 😭🔥. Still trying to wrap my head around how that went right, but hey, W is a W! #LeetCode#PriorityQueue#LearningOnTheGo#CodeLuck
Solved today’s LeetCode Daily in Java 💻 — although I could’ve used a PriorityQueue, I went for a cleaner approach using dual sorting with index mapping. Just sorted by value to get top k, then re-sorted those k by index to maintain order. Result? 7ms runtime, beating 83.2% 🚀🔥
Tried solving Leetcode 2311 using DP at first, but it got messy and inefficient real quick. Switched to a greedy approach instead — counted zeros and added 1s from the end only if the binary value stayed ≤ k. Way faster and cleaner. Final solution passed all test cases in 4ms
Just solved today’s LeetCode POTD with a simple brute-force approach (O(n²)) since it was an easy one 💻✅. Didn’t overcomplicate—sometimes going basic does the job perfectly! 🔥
#LeetCode#POTD#Java#Ayushkumarrai
Today's POTD was pretty easy to crack! Just had to sort the array and group elements such that the difference between the max and min in each group doesn’t exceed k. A simple greedy approach did the trick! ✅ #LeetCode#POTD#Java#CodingRoutine
Took a break from my learning phase due to a distraction that honestly messed with my head for a while. But now that the distraction is out, I’m getting back on track. I’ve lost a lot in the process—confidence, focus, even a bit of myself. But I also gained some perspective.
Now, I would not get my 365 Days LeetCode Badge… just because I couldn’t solve one problem on the day of my exam 😔
Pain. But we move.
It's not about the badge, it's about the habit🍄
#100DaysOfCode#LeetCode#DevJourney#ayushkumarrai