startups and code

Interview Tutorials

Back to home

Let's talk about interviews but more importantly, interview tutorials. There are several sites out there:

They take you through some questions and they focus on data structures and algorithms. The data structures that I see for the tips, are structures I would never use in a real world. Not that I wouldn't use the data structure itself, but not the implementation of the data structure.

Great example:

https://www.python.org/doc/essays/graphs/

This has a graph that is laid out like this:

graph = {'A': ['B', 'C'],
             'B': ['C', 'D'],
             'C': ['D'],
             'D': ['C'],
             'E': ['F'],
             'F': ['C']}

I would never (yes, I said never) do that. I would want a graph that had data in each node/edge of the graph.

So more realistically, I would have a node class, that would have something like this:

class Node:
    def __init__(self, data=None):
        self.graph = {}
        self.data = data

It seems simple enough of a change, but it is singnificantly different, because now I can check the paths, but also reference the data inside it (which may be a string, object, etc...)

There are several different data structures that you will play with when you interview. Hashtables, Graphs, Trees, etc... After you understand the implmentation of those data structures, then you will need to understand algorithms that make sense to use with those data structures. Algorithms like, insert into a tree, insert into a graph, find a route in a graph, search a tree (breadth-first, depth-first), pre-order, in-order, post-order traversal.

Now, I've always wondered about practical application of anything I learn. The most valuable is the hashtable, it is used in almost every project I have touched. You probably have used a version of a hashtable without even realizing it.

This post is going to be short, but wanted to remind you to think of real-world implementations, not the quick answer for a leetcode challenge. Sure, you can go through all of those and get the answer, but until you can see how you will practically apply it, you are simply memorizing and not processing information.

Here is an old github that I did some coding practice: CodeFundamentals

I think my next post is going to be about team culture and how important it is for productivity. It is actually MORE important than productivity. My tip for that is hire for fit over technical skill. Technical can be taught, work ethic and attitude cannot be taught.