Mastering Data Structures and Algorithms

Goal: To finish Schindler’s list

Arjun
14 min readSep 1, 2019

When I told a friend of mine about the challenge I was going to embark upon and asked him to define a challenging goal for me. He told me even the best of best competitive programmers in his college were not able to completely solve the challenge in given deadline of 1 hour.

Can I do it?

I’m gonna find out pretty soon, it’s just a matter of time. The idea is to push myself as much as I can. I’d like to fail spectacularly than succeed easily.

September 1, 2019

Am I even aware of something called productivity?

Today is the first day of outpacing challenge and I had a epiphany about myself. Not only I’m extremely good at wasting time but I also excel at keeping myself busy. That’s right, My friends and relatives have had enough and finally stopped complaining that I don’t even take their calls, forget calling them myself. I think challenge is already a success :)

I was trying to solve some Data Structures and Algorithms problems from a list of mine compiled long back, just like Schindler’s list. I tried to follow Pomodoro’s Technique and set timers of 25 minutes each on my roommate Google Home and found my mind wandering even when it knew I was on countdown. I finished only 3 problems.

Now onward I’m going to track my time entire day to remove the veil of productivity and busy-ness I’ve put myself behind. Tomorrow I’m going to attempt a past CodeForces round to see where I stand.

September 2, 2019

I can already feel the change

Spoiler Alert: I was wrong, most of the rounds on CodeForces have time limit of 2 hours or more and usually contain 6 problems or more.

Today I spent the day figuring out the nuances and intricacies of CodeForces and came around some intriguing concepts along the way. While reading an article by experienced programmer on how to become a competitive programmer, I came to know about some interesting concepts like Zone of proximal development and Parkinson’s law.

All of them reinforced the same neural paths of my brain which were laid down by The Talent Code by Daniel Coyle. Oh, did I just mention the ‘Talent Code’? Well, I’ve finished 4 books in last couple of months. Unsolicited grandiose, you’d think. Sorry about that, couldn’t help it.

Credits: surferstoday.com

For the uninitiated and curious the keys to master any skills are these:

  1. Break every skill into smallest steps possible and master those steps and later assemble them as pieces into the bigger puzzle. The aphorism “A journey of a thousand miles begins with a single step” exists for a reason.
  2. 2 minutes of actual practice are much better than reading a self-help guide about it for 2 months.
  3. If you are not pushing yourself out of your comfort zone, read Zone of proximal development, you are not improving yourself.
  4. Making mistakes is not only preferred but necessary in order to learn quickly.

I know you might already be aware of these concepts. By the way, did I tell you that you are ingenious? But I’m not and these were eye openers, at-least for me.

Today timers of 25 minutes each started paying off and I felt productive after a long time and solved 5 problems from my list and another couple of them from CodeForces. But I’ve this bad old habit of just reading things and not practicing. When was in School, I never practiced Mathematics. I’d just skim through the problems already solved by me and read the like a story because it saves time. Well, it worked at that time, but now it’s time to change for the good because I’m up against the big bull.

September 3, 2019

Today was the rest day and I was busy at work and then had an appointment with the doctor. Now I’m going to plan my diet and workout plan for gym. See ya tomorrow!

September 4, 2019

I made another discovery

After having decided to focus on quality instead of quantity, I’ve started solving every problem by myself instead of even peaking at hints or solution and figured out it’s easier than I thought. Even the scary DP problems which would suck the blood out of my soul earlier and cause my heart to palpitate are easy to solve.

Today I could manage to solve only 2 problems from Schindler’s list, one is all time famous Longest Increasing Subsequence and second was matching words in dictionary. But will I be able to finish the challenge at this pace, I doubt it. From tomorrow I’m going to time every damn moment I spend on this challenge.

September 5, 2019

My doctor made alarm bells sound in my mind

Today I solved 1 problem in nearly an hour and focussed on my protein diet and ran 10km.

My doctor got me worried and suggested a good night sleep and vitamin supplements. I was anxious for the rest of the day and couldn’t focus on the challenge. Tomorrow I’m going to Mumbai for 4 days.

Nice excuses, won’t you say? I’m gonna revive my challenge nonetheless. See ya guys!

September 6, 2019

Travel is life

I solved a single problem on flight from Hyderabad to Mumbai. Since yesterday I committed to getting atleast 8 hours sleep. I am gonna turn out the lights now.

Tomorrow I am gonna make a breakthrough in DS & Algo.

September 7, 2019

You should go to marine drive in Mumbai

I travelled to Mumbai at the worst time possible when it is raining incessantly and going out itself is a sin. Hence I decided to make best of it by locking myself in the hotel room till 5 in the evening and finishing 2 algorithms for pattern matching, KMP and Rabin Karp. Having had no other meal but breakfast and sharing my solitude with a laptop, notebook and a pen made me want to escape…desperately!

I ran on the road in the rain and after having lunch cum dinner took Mumbai’s famous local train to Churchgate to spend quality time in the serenity of sea waves at marine drive.

If you are traveling solo and want to socialize, asking strangers to click your pictures is the best way to strike a conversation. Better yet, offer to click their pictures first. Three of us ended taking the same cab to Churchgate station where the driver entertained us with Shayari one after another.

First things first, what about the challenge? I still haven’t picked up the pace yet 😣 How would i outpace the world? I should have taken this challenge for one complete year instead of month. Top programmers on Codeforces have been doing competitive programming since 8–9 years on average. Taking a single year challenge was still competent.

September 8, 2019

met DS masters but I’ve never been a good pupil

Today we were from IIT Bombay for recruitment and I was part of the panel representing my company. We solved some problems with some best minds on DS only that these weren’t DS and Algorithm related problems where I suck. Instead I asked them problems where they suck and I’m good at :)

September 9, 2019

Healthy mind resides in a healthy body. Cholesterol is innocent

Circumstances have dictated that I take good care of my body, diet and exercise. After work, I spent whole 3–4 hours researching about workout paradigms and diet. Do you know there’s something called 5/3/1 and PPL. I’m gonna follow latter since it’s good for Hypertrophy. Cholesterol is the most innocent molecule in the body that I’m aware of and Big-Farma companies have re-branded it as our biggest enemy to mint money.

September 10, 2019

I stand lower than I presumed

Finally I participated in a virtual contest on CodeForces. There were 6 problems to be solved in 2 hours. I was able to solve one in 2nd attempt since first attempt gave timeout on test cases. Then there was another problem which seemed wrong to me. In fact, I lost motivation in the mid and didn’t pay much attention. I even attended two phone call while still in contest. Worry not about it, I’m gonna participate again in a more serious manner.

September 11, 2019

I have become a machine

Sometimes I just feel I am just executing taks one after another and marking them 'Done’. I don’t feel a thing, before I realise it, the sun is set and another day has passed. I don’t have time to call my friends and family. But it has more to do with not managing time well than actually being productive.

Well, today I didn’t do anything specific to the challenge, I just turned to WhatsApp to chat with a couple of friends.

September 12, 2019

Now I know why I wasn’t progressing in my life

Well, I had a good pace life but no good enough, not the kind I dream of. I know the reason as well, Now I know how much I suck at not sticking to a routine.

But the good news is I’ve decided not to go on team outing tomorrow and will focus on my challenge instead. It’s gonna high performance 3 days starting tomorrow.

September 13, 2019

Finally some good news

Today I solved 6 problems and have 2 more solid days.

September 14, 2019

Relationships need time

After waking up late at around 12:30 I spent around 4 hours talking over phone and then went to have dinner with a friend of mine. Although I didn’t study anything but it was a great day.

September 15, 2016

Schindler’s list is almost over

I solved 3–4 problems from my list and the great thing is, it’s almost over there are 4–5 problems to go. Somehow I was never able to finish it. Even though my pace has been extremely slow, writing daily on Medium and treating it as a challenge is paying off. Of course There’s room for huge improvement and I can atleast triple my speed.

September 16, 2019

I want to confess for I have sinned

I am writing report for last 3 days today. I had been slacking and I admit it’s not fair since I promised to write my report daily no matter how the progress.

Today I didn’t anything pertaining to the challenge and didn’t go gym either. Instead I was trying to plan my workout routine. Especially because I am almost novice when it comes to gym, I didn’t have the slightest idea of exercises nomenclature let alone following a good regime. Moreover my gym trainers add insult to the injury, I guess I look more fit than them without even gym. Following their advice is a bitter nut, hard to digest.

After doing my research about Upper/lower body split, Bro reps, Full body split and Push, pull legs (PPL), I decided to stick with PPL and saw the YouTube videos of the exercises I didn’t understand. I’m going to follow this regime since tomorrow without a single day bunk from gym.

Next thing is diet, I tried to stick with 6 eggs, 1 litre milk, 600 gm yoghurt, 500 gm curd. I know it’s a ridiculous diet considering all the dairy products and saturated fat, maybe good for a calf. But I’m good at drinking milk. Anyway I wasn’t able to gobble down this amount of lactic acid in my body within a short span of 24 hours. Also, I lack the skill to eat while asleep.

Today I met a pal from my gym and he has improved tremendously in terms of muscle gains and fat loss within 3 months without any professional trainer. What’s that little secret which is hiding from me.

He hasn’t bunked gym for a single day and even cancelled his goa trip. I, on the other hand travelled to Andaman, Mumbai and hardly went gym for 1 month in last 2 months. You see?

Talk about diet, he eats 8 eggs, whey protein, protein bars, peanut butter, chicken twice a day, curd, dal, oats and multivitamins. Where do I stand? I doubt if I stand at all.

Which piqued my curiosity about chicken and bummm! There’s 32 gm protein in 100gm chicken. Crazy! Ain’t it? What’s next?

I’m gonna focus on chicken from tomorrow, which brings me to diet planning which I’m gonna do right away after publishing this.

September 17, 2019

Life is beautiful

My life is going to change drastically in coming months I guess. No, not due to challenge. Oh yes, due to challenge as well ;)

I’m gonna resign from my job pretty soon, but that’s story for another day.

I’ve started waking up at 7 in the morning, started following PPL in gym, included a lot of chicken in my diet. What else?

Today I studied from 9 to 11 in the office. That’s right I was in office elevator by 8:30. Although I did a single problem because I was sleepy as hell. I’ve chance to practice now since it’s only 22:24, but let’s focus on the long run for now. I’ve got to wake up early and my body isn’t used to sleeping so early so probably I’m going to spend next 1 hour staring at the ceiling fan and thinking… why can’t I fall asleep.

September 18, 2019

Did I say my life is going to change

Although I didn’t solve any problem today and will not solve any now because I have to adapt my body to sleeping at 11 and waking up at 7.

But did I tell yesterday that my life is going to change? Well it is and I’m gonna leave my job pretty soon. I hope it will be a good change!

September 19 ,2019

I met a stranger

I solved a single problem today but I was so happy that I tried it myself and cracked it.

But that’s not the best news. Best news is however I didn’t go to gym today but I spent 3.5 hours with a stranger turned friend sipping coffee and talking about so many things at Starbucks.

Together, we are going to pull great things in days to come. At-least that’s what I could smell.

September 20, 2019

Being efficient

At work, it’s the end of quarter 3 for 2019, so we had to write self-evaluation reports and peer feedback among some other documents. Instead of screwing up my weekend as I used to do earlier, I put in 4 hours at work and completed everything.

I returned at around 9 PM from the work and immediately ran to hit the gym. Afterwards, I invited a friend of mine over and we watched the web-series The family man. You should watch it if you haven’t. Because I’m no big fan of logging hours after hours watching Netflix feeding on popcorn. That’s the reason I’ve a few series in my life. Game of Thrones, Prison Break, Narcos (1 season), Westworld (1 season), Sacred games, Mirzapur. That’s it, yes I can count them on fingers.
By the way, Did I tell you someday I’m gonna resign from my job, take a break of 6 months and watch all bullshit out there. That’s right, I haven’t watched X-Men and Iron-man series yet. But I finished 5 episodes of ‘The family man’, Quite an achievement!

September 21, 2019

Life is short and there are so many things to do

Today I finished all 10 episodes of The family man and even watched the second part of ‘The lord of the rings’. I’m happy, I mean, Really! Now I laugh at slightest humor and even while talking to my mom over the phone. I don’t know what made the shift, maybe binge watching, But I used to despise talking on the phone especially.

Apart from that I finished a couple of problems from the list.

September 22, 2019

Schindler’s list is over, Finally!!!

A fact worth mentioning is that I watched an episode ‘Hated in the nation’ of ‘Black Mirror’. Someone had recommended this particular episode to me. Good news is I’m not disappointed.

Also, the Schindler’s list for Data Structures and Algorithms is over. Now I’m going to start with System design alongside. I know I’m far from the goal, in fact I’m going to change it. I didn’t really believe in my goal, I mean I knew it wasn’t that useful. The kind of skill-set I would have acquired after cracking CodeForces contest was different than I really needed. I was hesitant when I set the goal and it was reflected in my behavior throughout the challenge. I was bored as shit and it was difficult to find motivation to push through the day.

This time I’m going to set the goals I truly believe in and desperately want to achieve. So my aim over next week would be to finish this System Design resource on GitHub and keep on practicing DS&A problems at the same time.

September 23, 2019

Anyone to London?

I didn’t solve any problem today but gave first round of interview for an amazing company, Dream company sort of.

Overall the day was amazing and productive. I get the feeling that I’m gonna crack this interview. Next step will be flying to London and appear for next rounds.

Anyone wanna tag along for London?

September 24, 2019

Do you understand what scalability is?

Yes that’s the stuff I’m going through these days and it’s interesting as hell.

September 25, 2019

I feel devastated, it’s like my world has fallen apart

Even so I’m trying to pull myself together and keep myself busy, but I can’t help but become capricious. I can’t take it anymore. I am happy and cheerful and happy at one moment and depressed and pessimistic at another. Life is not fair and this whole existence thing seems futile.

Anyway, for the challenge, I am trying to continue on System Design.

September 26, 2019

Continuing on System Design

I don’t have much updates apart from that I’m continuing my journey on System design.

September 27, 2019

System Design is a vast topic

But I’m loving it

September 28, 2019

An Interview is the best way to practice

Today I gave an System design interview just for practice. I failed, the worst part is I have no clue what went wrong. I was expecting a positive outcome. Anyway, If someone can explain to me how to design a Subscription service system. Kinda payment gateway where you subscribe to something once and the service will charge from your debit/credit card periodically as per the subscription you opted.

September 29, 2019

Way to go!

Today I spent almost my all day reading the System design and I am so glad about it. It seems I’m turbocharged and running so fast that the world is in slow-motion.

September 30, 2019

Was it worth it?

As I sit in front of my laptop, fingers gliding through the keys, I’m left wondering here. How this month was different from numerous months I had in my life?

Did I meet my goal? Was I on the cliff or in comfort zone? Well, Yes and No.
First thing is I didn’t update the Medium daily, sometimes I just slacked and updated for 2–3 days in a single sitting. Second Thing is I changed my goal after I had set it. But a part of my heart didn’t want to follow the goal I set in the start.

But it goes without saying that I learnt much more than I would have if I didn’t take this challenge and I’m happy about it. I had become a super procrastination machine and this challenge took me out of the rut. Apart from my DS and System Design skills, I started working out seriously (so that I can take Squats challenge in future), drastically improved my diet to include proteins, green veggies, salads, cut heavily on sugar. I’m much more focused and ready to take the next challenge.

This post is part of accelerated learning project, Outpacing the fast-paced world.

If you want to follow along with my daily posts, make sure to follow this Medium account.

--

--