### Quick Sorting (Recursive and Non Recursive)

Algorithm Quick sorting (Nonrecursive) QUICK(A, N, BEG, END, LOC) Here A is an array with N elements. Parameters BEG and END contain the boundary values of the sub-list of A to which this procedure applies. LOC keeps track of the position of the first element. A[BEG] of the sub list during the procedure. The local […]

### Tower of Hanoi (Recursive & Non-recursive)

Algorithm – Tower of Hanoi (recursive) TOWER(N,BEG,AUX,END)This procedure gives a recursive solution to the Towers of Hanoi problem for N disks. 1. If N = 1, then:         (a) Write: BEG -> END.         (b) Return.    [End of If structure.] 2. [Move N – 1 disks from BEG to AUX.]  […]

### Selection Sorting Algorithm

Selection Sorting Algorithm: The selection sort starts from the first element and searches the entire list until it finds the minimum value. The sort places the minimum value in the first place, selects the second element, and searches for the second smallest element. The process continues until the complete list is sorted. A selection sort […]

### Algorithm to Calculate factorial using function

In this tutorial, we will write an algorithm to calculate factorials using the function. using this algorithm we can make a program to calculate factorial using functions in most programming languages like java python c++ and c programming. Algorithm to Calculate factorial using function. 1. Read N. 2. ANS=FACT(N). 3. Write ANS. 4. Exit [This […]

### Algorithm for Linear Search in Array

In this tutorial, we are going to write a Linear search algorithm in Array. using this algorithm we can write a program to linear search in the array for an element in almost every programming language like java, python, c++, and c programming. Algorithm for Linear Search in Array. 1. Read N 2. Repeat step3 […]

### Algorithm to reverse a given number

In this tutorial, we are going to write an Algorithm to reverse the digits of given n-digit numbers. using this algorithm we can write a program to reverse the digits of given n-digit numbers or a number in almost most programming languages like java python c++ and c programming. Algorithm to reverse a given number. […]