nail

Nail Every Coding Interview by Becoming Asymmetrical



Sharing buttons:

What's up everyone! Sam here from byte-by-byte.com and in this video I want to

talk about how to become asymmetrical in your interviews so that you can

maximize the upside, all while minimizing the downside, and get the best chance of

landing that dream job. So stick around and I'll talk about that in a sec.

Alright, so in this video, as I mentioned, I want to talk about becoming asymmetrical in your interviews.

And I think this is a really interesting

concept that I've never heard anyone talk about before, so I really want to

dig in and show you some strategies that you can use to become asymmetrical and

get the best results from your interviews. And so first I want to give

an example so that you can see what I mean by asymmetrical, because this is not

something that people usually talk about. So think about financial investing for a

second. Think about investing in the stock market. When you invest in the

stock market, you buy a piece of stock and either that price goes up or the

price goes down, right. And so if the price goes up, you make money. And if the

price goes down, you lose money. Pretty simple. And the question becomes, is there

a way that we can minimize our downside in investing while maximizing the

upside. Because let's say that I offered you two investments. In this investment,

you can buy it for $50 and you'll either end up with $100 at the end or $0 at the

end. And otherwise... that's investment A. And then investment B, I'll offer you for

$50 and you either end up at the end with $50 or you end up with $100.

Which would you choose? You'd pretty obviously choose the second

one, right. Because you have no downside and the only possibility is that you

either end up with what you started or you end up with double your money. And

this sounds crazy, right. It sounds like, how could this even be possible? But to

give you a specific example of this, there's a great example of... I forget the

investor's name, but he bought up about 20 million dollars worth of nickels. And

you might be like, why would you buy 20 million dollars worth of nickels? But the

reasoning behind this was that the value of a nickel - as long as the US Treasury

keeps accepting nickels - that's never gonna go below 5 cents, right. So you buy

20 million dollars worth of nickels, you always have at least

20 million dollars worth of value, unless the US Treasury goes away or stops

accepting nickels. But on the flip side, the metal in the nickels themselves

could actually be worth more than five cents. And so as the as there is currency

inflation and other sorts of things, the value of those nickels, just in terms of just the metal

in them, might actually go up beyond five cents. And so you have this upside with

no potential downside. And so that's what I mean by having an asymmetrical

relationship and an asymmetrical risk/reward. And so now I want to talk

about what does this mean for us in our interviews and how do we apply

this. And to do that, I want you to think for a second about how most people

approach their interviews. So when most people approach their interviews, they go

into the interview with the mindset of, I am gonna look at the problem and I'm

going to either come up with a solution or I'm not, right. There's not really a

plan behind it. It's more of a like, I'm gonna just look at the problem and hope

that I come up with a solution. And this basically sets up like a binary success

or failure, right. It's like I either recognize the problem, I've seen it

before or I can you know come up with a

solution on the fly. That would be the success. Or the failure is, I'm not able

to figure out this problem. And so when you go into an interview with that

mindset, there's no gray area in the middle. It's either you solve the problem

or you don't. And what this means is that you're

setting up this binary where it's like it's either pure success or pure failure

and there's nothing in the middle. And so there's no wiggle room if you are a

little bit stuck or like if you have a strategy, there's no wiggle room in this

case, where it's like you only succeed or fail. And so what I want to talk about is

how we can actually avoid having such a binary and how we can limit the downside

in our interviews while maximizing the upside. And I want to give you three

specific strategies for that. And so the first strategy that I want to talk about

is actually making sure that you do have a strategy for your interviews, right.

Because most people go in and it's like, did I memorize this problem? Do I

recognize a solution? And if I do, great; if not, I'm screwed.

And so if you have a strategy that you can apply consistently

to any problem that you see, then you always have something that works, right.

You always have something some sort of framework that you can follow, even if

you've never seen the problem before. And that's like crucial, because having that

framework is gonna allow you to make a lot more progress than you will

otherwise. And so to give you an example of this framework, one framework - and I'll

put this in the cards in the sidebar - that we talk about a lot is the FAST

method. And the FAST method is a method that I came up with for solving dynamic

programming problems. And the way that it works is it gives you a four step

process to follow anytime you see a dynamic programming problem. So it

doesn't matter if you've seen the problem before. It doesn't matter if you

like immediately see a solution, all you have to do is just follow the steps of

the process. So it's like you find a recursive solution, you find that first brute force

solution, then you analyze that solution. And you can check out our free e-book on

the FAST method and I go through all of this in a lot of detail. But you

analyze the solution, then you find that you like memo-ize that initial solution,

and then you find a bottom-up solution. And this is sort of the approach that

you take when you go through the FAST method. And by having that, it applies no

matter what the problem is. And so you just work your way through the problem.

And you always know that like, even if I didn't do as well as I could have done

in this interview, even if I wasn't like super-fast at coming up with the

solution, and even if I stumbled a little bit, I'm still gonna get there and I

still have a process that I can follow that will be consistent every time. And

so having a strategy is so, so important in your interviews. And I would encourage

you to, as you go through problems, try and identify what are the commonalities

between those different problems. Because if you can identify those commonalities,

then you are going to be much, much more prepared in seeing like,

what are the commonalities and what is that like consistent strategy that I can

follow every time I go through a problem. And so number one, have a strategy.

Number two, find a brute force solution to every problem you solve in your interviews.

and this is such an important point. And I've talked about this before, but

want to reiterate it, because I still do mock interviews with people all the time

who don't do this. And finding a brute force solution to your problem is so

valuable because that establishes a baseline for you, right. That sets the

minimum success that you can have. If you can find a brute force solution, it's not

optimal, it may not be the best solution, but you're never gonna end up with not

having a solution at all. And pretty much every problem, if you look hard enough

and if you think about it, you can find a brute force solution without too, too much

work, right. Like the brute force solutions at the easiest level, we can

just think through like, how would I solve this problem by hand, and then

apply that. Or just, you know, find all possible outcomes

and see which gives us the best result. Like there are

a lot of basic strategies we can use for finding that brute force solution. But if

you have a brute force solution, then you're establishing this baseline where

you're always going to have some solution. So remember, it's not about

always doing perfectly, it's about limiting the downside. And I'll tell you

for a fact as an interviewer, that there are times when I passed people on to the

next round of the interviews who just found a brute force solution to the

problem. So it's not like by not having a brute force solution... or by not having an

optimal solution you're guaranteed to be screwed, you might actually have success

if you just find the brute force solution. And this is why establishing

that like, you know, lower bound on our you know the quality of our answer

essentially and by minimizing that downside, is so, so important. And so

number one was finding a strategy. Number two, starting with that brute force

solution. And number three that is something that a lot of people don't

think about, but is: focus on the most common topics that you're

actually gonna see in your interview. So one thing that I see come up a ton, is

that people will spend all this time focusing on topics that are not likely

to come up in their interview. And a perfect example of this is something

like bit manipulation. Or even system design to a degree.

You're not likely to see very many system design interviews. Even if you're

an experienced engineer, the chances of you seeing more than one in an

interviewer are fairly low. And so what we found actually, at Byte by Byte we did

some research and we found that the most common questions that you're going to be

asked are string and array problems, tree and graph problems, and DP and recursion

problems. So if you just focused on those and nothing else,

you're really covering a lot of ground and you're making so much more progress

by doing that, then you are by getting into all these nitty-gritty little

things. Like, unless you're applying for a machine learning job, you should not be

studying things like A* Search, for example. We tend to get so

nitty-gritty because there are things we don't understand, but then we miss the

bigger picture. And so you'd be way better off spending more time on like

strings and arrays, than you would on some weird machine learning thing. And so,

with these three strategies, what this is gonna allow you to do is it's gonna

allow you to minimize the potential downside in your interview. And what I

mean by this is you're really going to establish a foundation where it's,

like, I may not do great, but I'm at least gonna do like mediocre. And even though

that doesn't really sound that good when I say it that way, imagine that as the

difference between I completely bomb or I do well. We're taking the

'I completely bombed' and we're getting rid of that total end of the spectrum and

we're shifting everything up. And so by becoming asymmetrical in your interviews,

you're gonna see a huge difference in how well you do on average through your

interviews. So I highly encourage you to apply these strategies and try these out

for yourself. And so with that, that's all I got for you today. If you enjoyed this

video, please, please hit the Subscribe button below and I'll link as well to

our dynamic programming guide where you can learn about the FAST method, you can

study and you can see exactly how to solve all the most common dynamic

programming problems. So definitely check that out and I look forward to seeing

you guys next week.