- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 546 Articles for Algorithms
8K+ Views
The searching algorithms are used to search or find one or more than one element from a dataset. These type of algorithms are used to find elements from a specific data structures. Searching may be sequential or not. If the data in the dataset are random, then we need to use sequential searching. Otherwise we can use other different techniques to reduce the complexity. In this Section We are going to cover − Binary Search Exponential Search Interpolation Search Jump Search Linear Search Ternary Search
3K+ Views
Pattern Searching algorithms are used to find a pattern or substring from another bigger string. There are different algorithms. The main goal to design these type of algorithms to reduce the time complexity. The traditional approach may take lots of time to complete the pattern searching task for a longer text. Here we will see different algorithms to get a better performance of pattern matching. In this Section We are going to cover. Aho-Corasick Algorithm Anagram Pattern Search Bad Character Heuristic Boyer Moore Algorithm Efficient Construction of Finite Automata kasai’s Algorithm Knuth-Morris-Pratt Algorithm Manacher’s Algorithm Naive Pattern Searching Rabin-Karp ... Read More
374 Views
We have seen different problems in different sections. There are some other problems which are not categorized. In this section we will see some of the random problems. In this Section We are going to cover. Adding base n numbers Babylonian method to find the square root Factorial of a large number Check if a given point lies inside a Polygon Check Perfect Square or Not Check if given four points form a Square Check if two given sets are disjoint? Check if two line segments intersect Check whether a given point lies inside a Triangle Connect n ropes ... Read More
1K+ Views
The Backtracking is an algorithmic-technique to solve a problem by an incremental way. It uses recursive approach to solve the problems. We can say that the backtracking is used to find all possible combination to solve an optimization problem. In this Section We are going to cover Hamiltonian Cycle M-Coloring Problem N Queen Problem Rat in Maze Problem Cryptarithmetic Puzzle Subset Sum Problem Sudoku Solving Algorithm Knight-Tour Problem Tug-Of-War Problem Word Break Algorithm Maximum number by swapping problem
492 Views
The Divide and Conquer is one of the different algorithm paradigm. It has mainly three different steps − Divide − In this phase the problem is divided into some small sub-problems of same type. Conquer − Solve the sub problems recursively. Combine − Combine the answers of the sub-problems to get the final answer. In this Section We are going to cover Closest Pair Point Problem Select Peak element from 2D Array Count inversions in an array Median of two Sorted Array
654 Views
Polynomial Time Approximation schemeWe can find some polynomial time solution for NP-Complete problems like 0-1 Knapsack problem or Subset sum problem. These problems are very popular in the real world, so there must be some ways to handle these problems.The Polynomial Time Approximation Scheme (PTAS) is a type to approximate algorithms for optimization problems. For the 0-1 Knapsack problem, there is a Pseudo Polynomial Solution, but when the values are large, the solution is not feasible. Then we need a PTAS solution.Some NP-complete problems like Graph Coloring, K-Center problem etc. they have no known polynomial time solution. PTAS used to approximate ... Read More
5K+ Views
Space ComplexitySpace complexity is an amount of memory used by the algorithm (including the input values of the algorithm), to execute it completely and produce the result.We know that to execute an algorithm it must be loaded in the main memory. The memory can be used in different forms:Variables (This includes the constant values and temporary values)Program InstructionExecutionAuxiliary SpaceAuxiliary space is extra space or temporary space used by the algorithms during its execution.Memory Usage during program executionInstruction Space is used to save compiled instruction in the memory.Environmental Stack is used to storing the addresses while a module calls another module ... Read More
14K+ Views
Amortize AnalysisThis analysis is used when the occasional operation is very slow, but most of the operations which are executing very frequently are faster. Data structures we need amortized analysis for Hash Tables, Disjoint Sets etc.In the Hash-table, the most of the time the searching time complexity is O(1), but sometimes it executes O(n) operations. When we want to search or insert an element in a hash table for most of the cases it is constant time taking the task, but when a collision occurs, it needs O(n) times operations for collision resolution.Aggregate MethodThe aggregate method is used to find ... Read More
25K+ Views
Asymptotic NotationsAsymptotic notations are used to represent the complexities of algorithms for asymptotic analysis. These notations are mathematical tools to represent the complexities. There are three notations that are commonly used.Big Oh NotationBig-Oh (O) notation gives an upper bound for a function f(n) to within a constant factor.We write f(n) = O(g(n)), If there are positive constantsn0 and c such that, to the right of n0 the f(n) always lies on or below c*g(n).O(g(n)) = { f(n) : There exist positive constant c and n0 such that 0 ≤ f(n) ≤ c g(n), for all n ≥ n0}Big Omega NotationBig-Omega ... Read More
668 Views
Asymptotic AnalysisUsing asymptotic analysis, we can get an idea about the performance of the algorithm based on the input size. We should not calculate the exact running time, but we should find the relation between the running time and the input size. We should follow the running time when the size of the input is increased.For the space complexity, our goal is to get the relation or function that how much space in the main memory is occupied to complete the algorithm.Asymptotic BehaviorFor a function f(n) the asymptotic behavior is the growth of f(n) as n gets large. Small input ... Read More
To Continue Learning Please Login
Login with Google