Ghost dev Blog

0

Solve Hanoi for N elements

Hanoi is a simple puzzle, you start with three rods and N disk, on the first rod. Each Disk is a different size. The biggest one is on the bottom, and they are stacked...

0

Child Steps

A child is jumping up a staircase. Staircase have “n” steps. Kid can jump one, two, or three steps at a time. Count how many ways’ child can jump upstairs. Example: n = 4(1,...

0

Line combination problem

Imagine you have a line of “n” length, where “n” is natural number. You can split this line in as many part as you want, but each part have to be natural number length....

0

What is dynamic programming

Dynamic programming is a method of solving a large problem by dividing it into small sub-problems that we know how to build an optimal solution and then base on that we can build our...