Design and Analysis of Algorithm

Selection Sort

In computer science, selection sort is a sorting algorithm, specifically an in-place comparison sort. It has O(n2) time complexity, making it inefficient on large lists, and generally performs worse...

Bubble Sort

Bubble Sort The algorithm works by comparing each item in the list with the item next to it, and swapping them if required. In other words, the largest element...

Bucket Sort

Bucket Sort Suppose we need to sort an array of positive integers {3,11,2,9,1,5}. A bucket sort works as follows: create an array of size 11. Then, go through the...

Sorting

Sorting is ordering a list of objects. We can distinguish two types of sorting. If the number of objects is small enough to fits into the main memory, sorting...

Amortized Analysis

Amortized Analysis Amortized analysis is a worst-case analysis of a a sequence of operations — to obtain a tighter bound on the overall or average cost per operation in...

Asymptotic Notations

The main idea of asymptotic analysis is to have a measure of efficiency of algorithms that doesn’t depend on machine specific constants, and doesn’t require algorithms to be implemented...

Properties of Algorithms

An algorithm is a series of steps or methodology to solve a problem. Properties of an algorithm:- It is written in simple English. Each step of an algorithm is...

Introduction to Algorithms

In mathematics and computer science, an algorithm is a step-by-step procedure for calculations. Algorithms are used for calculation, data processing, and automated reasoning. An algorithm is an effective method...