What are the differences between NP, NP-Complete and NP-Hard?

I assume that you are looking for intuitive definitions, since the technical definitions require quite some time to understand. First of all, let’s remember a preliminary needed concept to understand those definitions. Decision problem: A problem with a yes or no answer. Now, let us define those complexity classes. P P is a complexity class that represents the set of … Read more

Is Quicksort in-place or not?

Intro to Algorithms from MIT Press qualifies QuickSort as in-place – it sorts the elements within the array with at most a constant amount of them outside the array at any given time. At the end of the day, people will always have differing opinions (is Top-Down Memoization considered Dynamic Programming? Not to some “classical” folks), side with who you … Read more

What is the difference between statically typed and dynamically typed languages?

Statically typed languages A language is statically typed if the type of a variable is known at compile time. For some languages this means that you as the programmer must specify what type each variable is; other languages (e.g.: Java, C, C++) offer some form of type inference, the capability of the type system to deduce … Read more