Seriously, been working as a software developer for 9 years now and never passed a single coding test.

The jobs I got were always the ones giving me weekend projects or just no coding test at all.

I have a job opportunity that looks exciting but they sent me this coding test link and I know I’m gonna fail for sure. Any tips aside from the obvious (practicing in advance on leetcode etc)?

  • huginn@feddit.it
    link
    fedilink
    arrow-up
    18
    ·
    7 months ago

    What worked best for me was taking notes on some common algorithms and patterns. Dynamic programming is a really common domain of algorithms that you’ll find in coding questions, but you’ll need to know a bit of everything. Major graphing algorithms like Kruskals and Dijkstra’s, BFS/DFS and maybe the Bellman-Ford algorithm etc etc etc.

    But most importantly as you take notes on what each of these concepts or algorithms are - write in your own words how to choose them from the list of possible solutions.

    Here’s a sample of notes I wrote on backtracking algorithms:

    The basic idea of backtracking is that you permute based on a given state, iterating it forward by 1 then removing afterwards to check the next state. It is faster than using a hash table because you’re not constantly creating objects.

    For example, when trying to do combinatorial sums:

    [1, 2, 4] goal 7

    You have the following correct answers: [[1,1,1,1,1,1,1], [1,1,1,1,1,2], [1,1,1,2,2], [1,1,1,4], [1,2,2,2], [1,2,4]]

    You can quickly see a repeating pattern of values, which is a clear sign of backtracking being an efficient solution.

    The point of all of this is to get it into your head how to choose which algorithm, then you work on the speed with leetcode practice. So my regimen when I was searching for a job was to take an hour a day to study an old concept or learn a new one and then run some leetcode questions. This worked much better than unguided random grinding.

    The other issue with coding questions is defining the parameters and other communications skills. That’s a bit trickier - but ultimately Programming is a collaborative field. The stereotype of the aloof genius programmer who doesn’t talk to anyone is noxious: those kinds of people destroy programming teams. The best programmers are collaborative and have good communication skills. They know when to ask questions and when to interpret ambiguity on their own.

    That’s the harder part to get if you don’t have it (it took me more than a decade) but it makes a massive difference in the results.

    Good luck and God speed.