I OBSERVE A LOT
I see very little difference between development and DSA. I hear so many college freshers say things like, “I want to do dev, not DSA.” They try to choose between the two, while in reality, they should be doing both.
DSA is nothing but problem-solving — you use data structures or certain algorithms to solve a given problem, and then you try to optimize your solution. In a tech company, your job is to devise a brute-force way to solve the assigned task or problem so that you can at least start scratching the surface, and then go all the way in to optimize the solution further — to help the feature cater to the masses at scale and keep things running almost all the time.
Isn’t that the same as DSA?
Recently, I had a huge chunk of metadata from which I had to extract only a few selective things and then operate on them. I told myself, “Okay, let’s think from first principles. How would I solve this problem if I saw it on LeetCode?”
When I used to work on my company’s codebase, I would be very careful about using an extra variable or an additional array. I don't know why, it just felt wrong., I always wanted to come up with the best possible approach and follow clean code principles in one go. It’s a good practice, but I realized it was taking a little more time. I could be more efficient if I followed the classic brute → better → optimal approach.
So, as I was saying, I thought to myself — if this were a LeetCode problem, I’d first take a HashSet, put these numbers in, and then try mapping it. Extraction from a set takes O(1) time anyways, so it’s a very optimal way as well. The moment I felt all the constraints had been lifted, I started thinking in a blazing-fast way.
So really, there’s no difference between those DSA problems and development. Of course, many problems on LeetCode are much tougher and you don't get to see them on a regular basis in a tech company and form a separate vertical altogether, but the crux remains the same. A good developer is someone who comes up with a solution to problems quickly and then iterates and optimizes things.
This is what I’ve learned. I think a lot about these things. I observe a lot.

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home