BigO for technical interviews
Daniel Borowski
Posted on May 18, 2021
When preparing for upcoming technical interviews (especially for software engineering roles at FAANG companies), you might practice by solving coding challenges online and preparing by solving common interview questions.
One of our previous articles lists some common platforms where you can practice coding, like:
Big-O is an important concept you'll come across when learning about algorithms and data structures.
Big-O notation is used to classify algorithms according to how their run time or space requirements grow as the input size grows.
Coderbyte is the only platform where the runtime analysis for your solutions is generated and expressed in Big-O notation automatically in your profile. Below is a screenshot of how it'll look on your profile after solving a coding challenge.
function FindIntersection(strArr) {
let arr1= strArr[0].split(', ');
let arr2 = strArr[1].split(', ');
let intersArr= [];
for (i = 0; i < arr1.length; i++) {
if (arr2.includes(arr1[i])) {
intersArr.push(arr1[i])
}
}
return intersArr.toString();
}
When you submit a solution for a challenge and it passes all the test cases, your solution is then sent to our runtime-analysis server where we run a series of progressively larger test cases, and then statistically determine what runtime trajectory it matches. We currently will return one of the following common Big-O results.
We open-sourced our code for this as well (written in TypeScript) so you can learn how it works!
Posted on May 18, 2021
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
November 30, 2024