/Dynamic_C_programming

All C programming using dynamic memory allocation.

Primary LanguageC

Dynamic_C_programming

All C programming using dynamic memory allocation.

Sorting Algorithms:

  1. Bubble Sort
  2. Selection Sort
  3. Insertion Sort
  4. Quick Sort
  5. Merge Sort

Queue:

  1. insert( ): Insert a data in queue.
  2. delet( ): Delete front value in queue.
  3. printQ( ): Print all values inside queue.

Circular Queue:

  1. insert( ): Insert a data in queue.
  2. delet( ): Delete front value in queue.
  3. printQ( ): Print all values inside queue.

Collatz Sequence :
It start with the given number and ends with 1.
Input : 3
Output : 3,10,5,16,8,4,2,1

Fibonacci Series :
In case of fibonacci series, next number is the sum of previous two numbers for example 0, 1, 1, 2, 3, 5, 8, 13, 21 etc. The first two numbers of fibonacci series are 0 and 1.

Tower of Hanoi :
Tower of Hanoi, is a mathematical puzzle which consists of three towers (pegs) and more than one rings.
Rules :
The mission is to move all the disks to some another tower without violating the sequence of arrangement. A few rules to be followed for Tower of Hanoi are −

  1. Only one disk can be moved among the towers at any given time.
  2. Only the "top" disk can be removed.
  3. No large disk can sit over a small disk.