Looking for a job in programming?
Chances are you’ll come across Big O in the technical interviews.
Give me 3 minutes and I’ll show you how to ace them:
Chances are you’ll come across Big O in the technical interviews.
Give me 3 minutes and I’ll show you how to ace them:
Firstly, what is Big O Notation?
Big O describes an algorithm's runtime or memory consumption without the interference of contextual variables like RAM and CPU.
It gives programmers a way to compare algorithms and identify the most efficient solution.
Big O describes an algorithm's runtime or memory consumption without the interference of contextual variables like RAM and CPU.
It gives programmers a way to compare algorithms and identify the most efficient solution.
Big O answers one straightforward question:
"How much does runtime or memory consumption grow as the size of the input increases, in the worst-case scenario?".
"How much does runtime or memory consumption grow as the size of the input increases, in the worst-case scenario?".
So, how do you apply Big O in your interviews?
Here are a few scenarios where Big O can be used:
🔸 Live coding challenges
🔸 Code walk-throughs
🔸 Discussions about projects/solutions you've built
🔸 Discussions about your approach to programming & problem-solving
(cont. 👇)
Here are a few scenarios where Big O can be used:
🔸 Live coding challenges
🔸 Code walk-throughs
🔸 Discussions about projects/solutions you've built
🔸 Discussions about your approach to programming & problem-solving
(cont. 👇)
When any of these scenarios come up, be sure to mention the Big O of your solution and how it compares to alternative approaches.
This is especially useful in live coding challenges where you have to compare solutions on the spot — remember to think out loud!
(cont. 👇)
This is especially useful in live coding challenges where you have to compare solutions on the spot — remember to think out loud!
(cont. 👇)
Tip: When comparing solutions, pay attention to the problem’s requirements.
For example, linear complexity may be completely fine when the input can never be too large.
But if you’re dealing with big data, you’ll want to opt for something more efficient.
For example, linear complexity may be completely fine when the input can never be too large.
But if you’re dealing with big data, you’ll want to opt for something more efficient.
Of course, the goal is to get the correct Big O notation that applies to your solution.
But don't worry about getting it wrong.
Your interviewer will probably correct you when you do
The point is to show that you're thinking about the efficiency & performance of your solution.
But don't worry about getting it wrong.
Your interviewer will probably correct you when you do
The point is to show that you're thinking about the efficiency & performance of your solution.
Do this and you'll be able to showcase an important trait that technical hiring managers look for:
The ability to consider a solution's viability beyond whether it works or not.
This shows maturity in your decision making and approach to programming.
The ability to consider a solution's viability beyond whether it works or not.
This shows maturity in your decision making and approach to programming.
Don’t want to miss our content?
Subscribe to our 𝐟𝐫𝐞𝐞 𝐧𝐞𝐰𝐬𝐥𝐞𝐭𝐭𝐞𝐫 to get a deep-dive and a weekly roundup of our best content straight in your inbox:
levelupcoding.co
Subscribe to our 𝐟𝐫𝐞𝐞 𝐧𝐞𝐰𝐬𝐥𝐞𝐭𝐭𝐞𝐫 to get a deep-dive and a weekly roundup of our best content straight in your inbox:
levelupcoding.co
If this thread was helpful to you:
Like & Retweet the tweet below to share it with others 👇
Like & Retweet the tweet below to share it with others 👇
Loading suggestions...