I'm genuinely concerned I might harm myself further if I attempt more study, but at the same time, I need to fix my compensation trajectory or else I'll be in the same boat later. What do you use to avoid this?
It often goes unmentioned that these interviews test the wrong skills for software development and even instill bad practices. To wit, those artificially handicapped online IDEs force you to memorize language APIs which any real IDE would handle for you -- forget that the JS lowercase string call is "toLowerCase"? Too bad. Also, since time is of the essence, and no debugging tools are provided, you better be using an interpreted language (read: JS and Python -- and really only the former unless you can import the correct libraries) and littering your code with print statements.
Other companies opt for the ostensibly fairer "take home CRUD app assignment" but this too is a facade to lend credence to a preselected candidate pool. No matter how well you complete the assignment with all enterprise grade best practices, you'll still playing the lottery (and this time with a five hour time sink).
Bottom line is don't interpret a lack of success in this draconian system to a personal defect. Ideally, seek employers who assess candidates fairly and qualitatively.
- Create a study curriculum.
- Each topic in the study curriculum should contain both reading & practice material.
- The reading material tells you about the data structure or algorithm and practice lets your reinforce what you just read.
- Spread this over a long period of time say 6 months.
- Practice everyday, I cannot emphasise this enough.
- Limit to about 2-3 hours a day.
- Give mock job interviews weekly or bi-weekly. See https://www.pramp.com
- Be kind to yourself these questions are hard on purpose.
You will notice a gradual improvement in your problem solving skill and general knowledge about the problem space. You might even begin to enjoy it (that's what happened to me). Diving blindly into just solving problems is a poor strategy. The key is balancing reading & understanding the data structure or algorithm with solving actual problems.
As someone who has struggled seriously with self-harm in the past, this is not just a regrettable by-product of coding problems; this is a significant attempt by you/your body to regulate an environment that feels out of control, to cope with overwhelm, to distract yourself from facing something else—-ymmv, but until you work on understanding what triggers this (just coding? Other things too?), and develop tools for dealing with situations that provoke these intense feelings, this problem will re-occur in one form or another. Essentially, it’s too soon for a focus statement like “get better at leetcode” because the problem statement hasn’t been defined yet. That’s something you (and a therapist and/or workbook, online resource etc, if money is a challenge) can do together.
Now the good news: not only can you address this, but doing so will have amazing and unforeseeable benefits in more areas than just coding. This stuff never fully disappears, but I can now look at a passing thought to hurt myself as a “check engine light”—-it does not have power over me, it occurs seldom, and if it does, it means something needs addressing.
Best of luck.
250 sounds like a lot, but I'd also be curious how you do the problems, and why you're having issues.
Where are you getting stuck? Are you looking at the answers immediately? Or are you struggling through the problem, and only peeking at hints as much as is needed to make a breakthrough?
Do you think through and recognize the patterns (two pointer, greedy, dynamic, etc) that are needed to tackle the problem, or are you just jumping into code instantly?
What do you do when you get stuck? Do you confidently ask for help, knowing hints are part of the game?
How's your timing? Are you getting in a brute force solution and an optimized one?
Addressing these concerns will reveal where you need work, and then you can continue to get better without being too affected by your current state. Remember, no one was born knowing how to solve these problems, so you can always get better and reach your economic goals.
Small plug -- we created AlgoDaily (https://algodaily.com) to teach programming interview skills using a visual, patterns-based approach. The lessons on approaching the interview and how to prepare might be especially helpful.
Observe your emotions - there may be a completely different solution to your problems.
Assuming you're not fresh out of college and have plenty of experience (and skills to go with it), find a job that doesn't put you through this dumb grinder. Odds are it'll be a job you'll actually enjoy doing.
Maybe getting a lower salary is very well worth it if it lets you avoid the self harm and depression. SE salaries in general are pretty good so even if you’re in the lower end of the scale it’s decent. Not everyone can earn 300k total comp by working for the usual suspects, earning 80–100k if you don’t live in overpriced cities/countires is still a pretty good life.
That covers a lot of patterns you can typically use to solve a problem. Keep practicing and don’t lose heart. Use mock interviews to get valuable feedback. You can do it.
I failed the first phone interview because I was absolutely unable to guess what he was looking for.
2 years later again 2,5 month preparing for it. This time also large system design. I make it to inside. I still not in.
It is emotional stressful. That's how it is.
If it helps, maybe move somewhere with a better wage to cost of living ratio.
Just do several interviews in a row to learn what the common questions are. Then memorize those 3 or 4 solutions.
There's been a move this year to fully using the 1 hour coderpad period with a large problem, so you really need to go in with a prepared solution. (Thanks a lot, a(7) interviewers.)
As one of my friends said, "Interviews are a lottery." So do your best, then move on to the next one (see above.) Don't take it personally, just keep improving.
Also, if an interviewer says, "it doesn't matter if it runs or not" or "syntax doesn't matter", assume they're lying and fix it. (Again, thanks a lot, a(7) interviewers.)