An algorithm is a step by step method of solving a problem. It is commonly used for data processing, calculation and other related computer and mathematical operations.
An algorithm is also used to manipulate data in various ways, such as inserting a new data item, searching for a particular item or sorting an item. Technically, computers use algorithms to list the detailed instructions for carrying out an operation. For example, to compute an employee’s paycheck, the computer uses an algorithm. To accomplish this task, appropriate data must be entered into the system. In terms of efficiency, various algorithms are able to accomplish operations or problem solving easily and quickly.
Algorithms are widely used throughout all areas of IT (information technology).
The word algorithm derives from the name of the mathematician, Mohammed ibn-Musa al-Khwarizmi, who was part of the royal court in Baghdad and who lived from about 780 to 850. Al-Khwarizmi's work is the likely source for the word algebra as well.
Analysis of Algorithms
- Analysis of Algorithms | Set 1 (Asymptotic Analysis)
- Analysis of Algorithms | Set 2 (Worst, Average and Best Cases)
- Analysis of Algorithms | Set 3 (Asymptotic Notations)
- Analysis of algorithms | little o and little omega notations
- Lower and Upper Bound Theory
- Analysis of Algorithms | Set 4 (Analysis of Loops)
- Analysis of Algorithm | Set 4 (Solving Recurrences)
- Analysis of Algorithm | Set 5 (Amortized Analysis Introduction)
- What does ‘Space Complexity’ mean?
- Pseudo-polynomial Algorithms
- NP-Completeness | Set 1 (Introduction)
- Polynomial Time Approximation Scheme
- A Time Complexity Question
- Time Complexity of building a heap
- Time Complexity where loop variable is incremented by 1, 2, 3, 4 ..
- Time Complexity of Loop with Powers
- Performance of loops (A caching question)
Searching and Sorting
Other String Algorithms
- Lucky Numbers
- Babylonian method for square root
- Multiply two integers without using multiplication, division and bitwise operators, and no loops
- Average of a stream of numbers
- Count numbers that don’t contain 3
- Magic Square
- Number which has the maximum number of distinct prime factors in the range M to N
- Find day of the week for a given date
- DFA based division
- Given a number, find the next smallest palindrome
- Find the largest multiple of 3 | Set 1 (Using Queue)
- Lexicographic rank of a string
- Print all permutations in sorted (lexicographic) order
- Find the largest multiple of 2, 3 and 5
- Measure one litre using two vessels and infinite water supply
- Russian Peasant (Multiply two numbers using bitwise operators)
- Count all possible groups of size 2 or 3 that have sum as multiple of 3
- Find Excel column name from a given column number
- Calculate the angle between hour hand and minute hand
- Find the smallest number whose digits multiply to a given number n
- Draw a circle without floating point arithmetic
- How to check if an instance of 8 puzzle is solvable?
- Replace all ‘0’ with ‘5’ in an input Integer
- Given a number as a string, find the number of contiguous subsequences which recursively add up to 9
- Program for Bisection Method
- Program for Method Of False Position
- Program for Newton Raphson Method
Quizzes on Algorithms
- Commonly Asked Algorithm Interview Questions | Set 1
- Given a matrix of ‘O’ and ‘X’, find the largest subsquare surrounded by ‘X’
- Nuts & Bolts Problem (Lock & Key problem) | Set 1
- Flood fill Algorithm – how to implement fill() in paint?
- Given n appointments, find all conflicting appointments
- Check a given sentence for a given set of simple grammer rules
- Find Index of 0 to be replaced with 1 to get longest continuous sequence of 1s in a binary array
- How to check if two given sets are disjoint?
- Length of the largest subarray with contiguous elements | Set 1
- Length of the largest subarray with contiguous elements | Set 2
- Print all increasing sequences of length k from first n natural numbers
- Given two strings, find if first string is a subsequence of second
- Write a function that returns 2 for input 1 and returns 1 for 2
- Longest Monotonically Increasing Subsequence Size (N log N): Simple implementation
- Generate all binary permutations such that there are more or equal 1’s than 0’s before every point in all permutations
- Lexicographically minimum string rotation | Set 1
- Construct an array from its pair-sum array
- Check if characters of a given string can be rearranged to form a palindrome
- Print all pairs of anagrams in a given array of strings