An **algorithm **is a step-by-step procedure for solving a problem in a finite amount of time. The procedure should be sequential and deterministic.

# Algorithms

# Data Structures

**Data structure **is an efficient way of organizing data for storage and access by an algorithm where as an **algorithm** a step by step procedure for performing some task in a finite amount of time. Algorithms and data structures are closely linked to each other.

# Stack ADT Implementation

The Stack ADT stores arbitrary objects and insertions and deletions of this ADT follow the last-in-first-out (LIFO) scheme like a spring-loaded plate dispenser.

# Queue ADT Implementation

The Queue ADT stores arbitrary objects and insertions and deletions of this ADT follow the first-in-first-out (FIFO) scheme i.e. insertions are at the rear of the queue and removals are from the front of the queue. As in a line or queue at a ticket stand, items are removed from the data structure in the same order that they are added.

# Recursive Algorithm: Towers of Hanoi

The classic problem of the Towers of Hanoi is a mathematical game or puzzle, where you have 3 towers and N disks of different sizes which can slide onto any tower. The puzzle starts with disks sorted in ascending order of size from top to bottom, the smallest at the top, thus making a conical shape.

# Memoization: Make Recursive Algorithms Efficient

Memoization is a technique for implementing dynamic programming to make recursive algorithms efficient. It often has the same benefits as regular dynamic programming without requiring major changes to the original more natural recursive algorithm.