Complexities, Coding, and Testing

Let's discuss complexity and coding considerations in algorithm design.. We’ll also discuss the role of testing to make a program align with the expectations.

We'll cover the following

Complexities

Getting our programs to output correctly isn’t the only thing to an appropriate solution. We also need to think about how fast our solution is and how much space it takes. In the previous lessons, we learned about the big-O notation. If we think our solution isn’t the optimal one, we can always try to come up with a better one.

Most interviewers want you to be able to determine the algorithms’ time and space complexity. Whenever you’re working on a problem, you should consider the level of difficulty involved. An important thing to know is that there are certain trade-offs between the space and time complexity of some algorithms. Taking a little extra space can save us a lot of time and make the algorithm run even quicker.

Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy