Category: optimization
September 5, 2014
algorithms, beginner, c / c++, code, code library, math, optimization, programming languages, recursive, tricks
We all know the formula to compute value e (mathematical constant that is the base of the natural logarithm) is e = 1 + 1/1!+ 1/2!+ .....+ 1/n! Now, …
The Dynamic Programming DP is one of the most-used approach to solve problems that satisfy the overlapping sub-problems and the optimal substructures. The simplest example is to compute Fibonacci …
Remember a couple days ago, I write a solution to this puzzle using Dynamic Programming (DP)? The DP solution helps to avoid duplicate computation in the sub-problems (smaller size). …
Question: Given an integer (maximum 100), compute the number of distinct ways to split the number using non-negative integer numbers. For example, given 5, there are 7 ways to …
November 5, 2013
32 bit, algorithms, assembly language, c / c++, code, implementation, interpreter / compiler, optimization, programming languages, windows
Introduction You probably came across the term ‘Tail Recursion’ or ‘Tail Recursive’ before. You even have written a piece of Tail Recursive functions/algorithms without knowing it. So, what is …