The importance of writing Quality Code

Most people fail their coding interviews for the exact same reason, and they still don’t know it. This frustrated me a lot back in the days. I went to interviews. I solved every question optimally. I discussed several approaches with the interviewer. I communicated well. I explained the time and space complexities. And I still […]

Continue Reading

How to apply memoization in Python using functools

Memoization is a technique used to optimize an exponential recursive function into a fast polynomial one. Let’s take the classic problem of Fibonacci numbers. The recursive function would look like this: In order to obtain an time complexity, we want to transform it using memoization. Because is called multiple times, we want to store the […]

Continue Reading