I think learning data structures and algorithms as a software engineer is important. And if you legitimately want to pursue a deeper understanding of those because you have a practical purpose in mind, that's great.

But if that does not really interest you, and you only do it to pass some pointless interview to become an entry level employee at a MAANG... you need some perspective in life.

Let's say you do become an employee at a MAANG. You buy an expensive house, now you have to pay the mortgage for years. You get married, start a family with kids... now you have raised your cost of living to the point it is really hard for you to make less money. Now you have long-term, lifetime commitments that require you to make a lot of money, and your MAANG manager will sniff that desperation, will rub his hands, do an evil laugh and then work you to death.

Your family will be happy and abstracted from everything, but you will be deeply unhappy. You will have no time to make friends, you will be a foreigner in a very different country and nobody will understand you. You will go on vacation to expensive places, but your mind will always be trapped in the anxiety dimension created by your manager and your H-1B status. With a couple of mouse clicks and the stroke of a pen, your manager can make everything go away at any moment because when you lose your H-1B status you have to leave the country at once.

You will eventually get used to your higher standard of living and become indifferent to the materialistic aspects of your life. The excitement of your new life will fade away. Living in a nice house won't matter, having an expensive vehicle won't matter. You will have musical instruments and a boat and whatever hobbies but you'll have no time to pursue them. You will soon realize that you have money but no time.

The little time you have left, will be for you to spend with your kids, but you will be too tired to have meaningful interactions with them. Your kids will become spoiled by the standard of living you provide and will barely know you because you are always busy with work. They will grow in another country, speak a different first language, and will be assimilated by another culture. As they grow, they will feel more culturally disconnected from you, and become indifferent to you, your culture and your identity. Just like you did, they will leave the nest and never look back. You will be reduced to a contact in someone's smartphone that is never called.

You soon realize that the cost of your prosperity is the solitude and distance from your family and friends. You will be a miserable MAANG salaryman that made a pact with the devil and lost his soul. And it all started with the empty promise that if you complete enough stupid Leetcode exercises you will be rich and happy. If you are not already happy without a MAANG job, you won't be happy with one.

And I am going to plagiarize the ending of a similar story here:

His darkest secret, however, is that he lives in constant fear that, some day, he will fail. He will fall behind with his tasks, he will not meet his manager expectations and be replaced by younger engineers with more energy and more up-to-date knowledge. He will realize that his friends at work were fair-weather friends and that he lost, in a single stroke of fate, the attention he was so eagerly seeking.

Like the rest of us, he will grow old, his priorities will change, his eagerness will die down. As he looks around him, he may realize that the best times of life have passed him by, and that there is no making up for the lost time. He will be bitter, having left an insignificant mark on the world, having wasted his time in pointless pursuits. No one will miss him.

To him, I dedicate this epitaph:

Here Lies a Pirate
Who Never Sailed.