SDE@Amazon | Loves Linux | Building things, breaking them and learning along the way.

Joined June 2024
387 Photos and videos
Pinned Tweet
Career update:- Joined Amazon as SDE-1 I have been grinding for the past 1.5 years while working full time job/ freelancing on the side. Tough but definitely doable and grateful for the people who’ve supported me. I wish everyone a Happy and Blessed Rakshabandhan!
97
26
1,875
76,653
22/11/25 @LeetCode POTD Use mod to see how far values are to become 0 or 3 so they become divisible. If mod equals 1 = we subtract 1 (1 operation) 2 = we add 1 ( 1 operation) essentially boils downl to if mod != 3 add 1. #LeetCode #Coding
6
300
is the leetcode streak counter broken today? solved today's potd but it did not increment the count. Though the transition from 0 to 1 doesn't matter lol #LeetCode
4
108
Clocking in 12 hours everyday (sometimes even on weekend) though there’s no time restrictions at work. Feels good to grow but sometimes I wonder at what cost. Anyways, I hope it motivates you to put in the hard work because at the end that is what matters. Good luck!
1
10
150
After a long time 27/10/25 @LeetCode POTD We need to find 2 neighbouring rows that have atleast one 1. Keep a prevCnt to keep track of prev valid row. Calculate currCnt if it has atleast one 1 then we can update the ans as per prev * curr. #dsa #LeetCode
1
8
632
Happy Choti Diwali and belated Dhanteras wishes for everyone. I hope this festive season of lights brings joy and happiness for you!
1
4
225
Writing a lld and getting is approved by the team is gotta be difficult and exciting part of the job at the same time ;) No sleep/work schedule Dry run solutions Pen paper Make pocs Draw/write That is why I haven’t been posting lately. How are y’all?
2
7
173
11/10/25 @LeetCode POTD we have option for every index to pick or not pick it. To not check the previous -1, and -2 we sort the array and use recursion to skip forward steps in this way we take care of the not_take element's prev vals. Use freq map to count all the occurrences.
2
15
408
Hey everyone busy with work and also broke my 385 day streak sucks :( 10/10/25 @LeetCode POTD Think about it in bottom up dp. from n-k to n-1 we will exceed n's boundary from n-k-1 to 0 we can simply add the val at i k to get the final res iterate through the ans arr to get max
7
154
01/10/25 @LeetCode POTD Simulate the process. #DSA #Coding
12
166
30/09/25 @LeetCode POTD On trying we find that the problem boils down to MCM pattern. Too tired and hence did not solve it bottom up. TC-O(n^3) SC-O(n^2) #DSA #Coding
1
17
349
28/09/25 @LeetCode POTD Sort and check for valid triangle condition for 3 consecutive pairs. TC-O(nlogn) #DSA #coding
1
15
290
27/09/25 @LeetCode POTD Did not knew about shoelace formula so I used heron's. attaching both solutions below #LeetCode #coding #DSA
1
6
133
26/09/25 @LeetCode POTD 2 approaches based on triangle prop of sum of any 2 sides is always greater than 3rd side. sort the arr 1) fix the highest side and use 2 pointers to look for valid combination of those 2 smaller sides > the highest side. all el in that rnage can be cnted.
1
5
105
2) After sorting use 2 for loops fixing any 2 sides and searching for the third side in the remaining portion where it is just smaller than their sum. TC approach 1) O(n^2) approach 2) O(n^2logn)
2
26
25/09/25 @LeetCode POTD Doing dp after a long time. Explore all paths and take minimum. Space opt is we only need the next state so just keep track of that. TC-O(n^2 n) SC-O(n) #CodingJourney #DSA #LeetCode
1
16
270
25/09/25 @LeetCode POTD simulate the long division method.
6
247
23/09/25 @LeetCode POTD Capture the val after '.' and compare make sure to move the indexes properly. TC-O(n) SC-O(1) #LeetCode #CodingJourney
12
175
22/09/25 @LeetCode POTD Missed the design problems :( Simply count how the number of diff numbers with max_freq. We multiple them to get the final ans. TC-O(n) SC-O(n)
10
127
21/09/25 @LeetCode POTD Keep unrented map of move to set of price,shop. Another rented set to store Price, Shop, movie list. We miss here a way to get price based on shop and movie so we build one. Operations are straightforward and logarithmic. #LeetCode #coding
1
20
457
20/09/25 @LeetCode POTD missed the fact that timestamps are in increasing order so implemented pbds. Using a vector to keep for timestamp and using bs on them would have been just fine. Pbds is a set and to make it multiset combine it with src making key uniques.
1
8
156
Sol2) since the timestamps are sorted and when removing packet we are processing them in FIFO we can keep track of removed packets count for destination and apply binary search after first remCnt elements. Less code but more ds to manage than pbds.
2
44