Nokia Interview Question

Create an algorithm to create a pyramid