Day 2 of My Placement Journey
Today, the First time I encountered what are linked-lists and dynamic programming. They are on a whole other level than what I've been doing in an array. And still, now, I can't fully grasp the operations I can do on them. But I've started my thinking brain and slowly turned my thinking wheels around.
I only solved three questions today, Kadane's Algorithm, Minimize the heights and a Minimum number of jumps, from the list of 450 questions provided by Love Babbar.
Kadane's algo took my soul away from me, I was so looking forward to solving questions today but the first question I encountered, I didn't think myself. I watched Love Babbar's video first, but still I couldn't do it right in the first attempt. It took 11 half-ass attempts and even after that, I had to check for the submitted solutions to check what I was doing wrong. And it was to just put if condition in the starting of the for loop. Finally, in the end, I solved it and moved forward with the next question.
For the next question, It was to subtract or add the given number K from the elements of an array, such that I get the minimum difference between the tallest and shortest building in the array. I tried to think and do it all by myself and was somewhat successful in doing it. I did pass the sample test cases but could not do it for the actual ones. After mulling over it for few times, I checked for its solution and found an oversimplified version of my messed-up code. So, I copied it and ran the code. And moved on to the next one.
For the third one, My brain was nearly dead from the match going on today between SRH and RCB, and after that my lust took over me, I saw some pics of Nora Fatehi and then had to control myself. But after this much, who wants to write the code, so I copied it from the GPT and pasted it. Will understand it tomorrow.
I think that's it for today. See you tomorrow.
Subscribe to my newsletter
Read articles from Jitesh Yadav directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by