Algorithms
In mathematics and computer science, an algorithm is an unambiguous specification of how to solve a class of problems. Algorithms can perform calculation, data processing, automated reasoning, and other tasks.
As an effective method, an algorithm can be expressed within a finite amount of space and time and in a welldefined formal language for calculating a function. Starting from an initial state and initial input (perhaps empty), the instructions describe a computation that, when executed, proceeds through a finite number of welldefined successive states, eventually producing “output” and terminating at a final ending state. The transition from one state to the next is not necessarily deterministic; some algorithms, known as randomized algorithms, incorporate random input.
The concept of algorithm has existed for centuries. Greek mathematicians used algorithms in the sieve of Eratosthenes for finding prime numbers, and the Euclidean algorithm for finding the greatest common divisor of two numbers.
The word algorithm itself is derived from the 9th century mathematician Muḥammad ibn Mūsā alKhwārizmī, Latinized Algoritmi. A partial formalization of what would become the modern concept of algorithm began with attempts to solve the Entscheidungsproblem (decision problem) posed by David Hilbert in 1928. Later formalizations were framed as attempts to define “effective calculability” or “effective method”. Those formalizations included the Gödel–Herbrand–Kleene recursive functions of 1930, 1934 and 1935, Alonzo Church’s lambda calculus of 1936, Emil Post’s Formulation 1 of 1936, and Alan Turing’s Turing machines of 1936–37 and 1939.

Algo: Print a m*n matrix in square wise
Check sample input and output below. Sample Example Input: 14 15 16 17 18 21 19 10 20 11 54…
Read More » 
Pascal’s Triangle
Pascal triangle in C int i, space, rows, k=0, count = 0, count1 = 0; row=5; for(i=1; i<=rows; ++i) {…
Read More » 
Check two strings are anagrams
Two string with same set of character is called anagram. I have used javascript here. We will create an hash…
Read More » 
Longest Increasing Subsequence
Longest Increasing Subsequence Basic Information The Longest Increasing Subsequence problem is to find subsequence from the give input sequence in…
Read More » 
Longest Common Subsequence
Longest Common Subsequence Explanation One of the most important implementations of Dynamic Programming is finding out the Longest Common Subsequence.…
Read More » 
Equation Solving
Linear Equation There are two classes of methods for solving Linear Equations: Direct Methods: Common characteristics of direct methods are…
Read More » 
Knapsack Problem
Knapsack Problem Basics The Problem: Given a set of items where each item contains a weight and value, determine the…
Read More » 
Travelling Salesman
Brute Force Algorithm A path through every vertex exactly once is the same as ordering the vertex in some way.…
Read More » 
Hash Functions
Hash codes for common types in C# The hash codes produced by GetHashCode() method for builtin and common C# types…
Read More » 
Depth First Search
Introduction To DepthFirst Search Depthfirst search is an algorithm for traversing or searching tree or graph data structures. One starts…
Read More »