6

Have you ever seen a tree data structure implementation in any code base?
I wonder why recruiters are so desperately asking how to invert binary trees in my coding interviews🥴

Comments
  • 6
    A whole bunch of people can do most software dev tasks. As a hiring manager or whatever, how would you choose?

    Performance on abstract problems like that shows raw brain skills. The policy many recruiters follow is if two devs have roughly similar skills and don't need specialized stuff, choose the one who can brain better. Less chances of hiring a dud. Similarly, degrees (they're there to cover minimum bars).

    Which is imo way better than random chance, wouldn't you say?

    (btw, yes I have seen tree implementations, but admittedly for specialized stuff)
  • 3
    Not in actual use.
    But as @RememberMe said, it's a means of testing your knowledge of performance and optimisation. Not all software can or should run with infinite resources.
  • 4
    I wrote a set of generic tree algorithms last month for handling parity checks on hierarchical relationships. I also use them constantly for problems that deal with indexing and caching.

    I will say you are correct about their usage not being common in most people's code. That said, the lack of their being common speaks more to a willingness of companies to hire on price than an absence of their relevance in solving day to day problems. Companies are always cost cutting, and one way they do that is take ever increasing steps to erroneously classify engineering professions as unskilled commodity labor. Given most people aren't capable of identifying classes of problem given a context, they inevitably write the same code over and over with a problem:solution mindset. Because of that, the naturally emerging algorithms that rely on that intuition are also statistically unlikely to be present.

    @RememberMe
    Given the low quality of most modern degrees, I'm starting to question whether it's really a bar anymore. It seems to act more as a financial barrier than anything else.
  • 0
    I really wished I knew how interview happens when I was in my sophomore, I spent so much time learning development-related stuff which is not really relevant now given that initial rounds require you to clear the coding challenges that are mostly related to dynamic programming and greedy approaches😪
Add Comment