Hi everyone!
I recently finished 3 months of interviewing, and I received multiple offers! It was no walk in the park because my data-structures knowledge wasn't the best.
In particular, I was terrible at solving binary tree questions. So I practiced and practiced and practiced until I became confident I could solve almost any binary tree questions on LeetCode/HackerRank.
I want to prepare a guide that explains my process for solving these questions to help anyone struggling in this area or just want to refine their skills.
My question is, what would you expect from a complete guide on solving Binary Tree questions? My working outline so far is as follows:
Foundation
-Tree DS: class, insertion, deletion, array-based trees
-All Tree Traversals (recursive)
-All Tree Traversals (iterative)
-Tree specific Algorithms
How to Solve
-How to determine the type of question and solution (my guide)
-Common gotchas
-20+ Question Solution Explanations
Do you feel like something is missing? Please comment on any ideas you have or if you want to receive this guide when it releases!
I'll be working on this over the coming weeks and releasing it in pieces over twitter and devto. If you want to follow my process and get a behind the scenes look, follow me on Twitter!
Top comments (13)
If programming is all about tree traversials then I dont really want to live in that world.
Sorry, its a bit misleading but that wasn't the only type of question I was asked! Its just an area where a lot of people struggle in interviews.
It sucks that a lot of companies want to ask white board questions instead of testing your actual project making abilities but at the end of the day we still need a job :/
Yeah I know, interviews suck.
I agree. I think that if companies are relying on cookie-cutter questions about things you'll never have to write in your entire time as an employee, then they;re going about interviews wrong.
That doesn't mean they'd be a bad company to work for, though.
While I can dredge up the memory of certain sorting algorithms when I really need to I usually try to get the interview into more of a conversation where I can explain what approach I'd use in the real world instead.
Well, i can also say that if "programming" it's all about doing "tumblr" stuff with js I don't really want to live in that world.
"Tree traversials" it's Computer Science, not programming. JS animations can be wrote by toddlers.
We can make the distinction without attacking people who write js animations :)
Please be more considerate Matteo, it really goes a long way.
I mean, a lot of ppl thinks that CS is just doing fancy stuff with React/Angular & Co. and then say that real CS stuff are "cookie cutter" questions...
I dont know why people bother with animations, they don't improve anything.
They improve the user experience! Imagine if there was no animation on any website, would that not be very bland?
They do, but sometimes they can be distracting :)
A little update for those who aren't following on twitter 😉
Congrats Abdisalan. I appreciate the thoughts of sharing your knowledge with a great intention that others dont need to suffer much. Keep it up.
Thanks!