Skip to content

Latest commit

 

History

History
610 lines (291 loc) · 16.5 KB

algorithm list.md

File metadata and controls

610 lines (291 loc) · 16.5 KB

Essential-Algorithm-list-with-link

Algorithm and programming Technique list (with relative links)

Mathematics:

http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=math_for_topcoders

Sieve of Eratosthenes (prime finding)

http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes

http://www.shafaetsplanet.com/planetcoding/?p=624

http://translate.googleusercontent.com/translate_c?act=url&depth=1&hl=en&ie=UTF8&prev=_t&rurl=translate.google.com&sl=auto&tl=en&twu=1&u=http://e-maxx.ru/algo/eratosthenes_sieve&usg=ALkJrhhwtnMHMOYCdg4BxIfMFpyTHN-_pA

Bitwise Sieve

http://www.shafaetsplanet.com/planetcoding/?p=855

Segmented Sieve

http://zobayer.blogspot.com/2009/09/segmented-sieve.html

prime factorization

https://www.dropbox.com/s/ndai0fquchmazu7/factorization.pdf (pdf by jan vai)

http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=primeNumbers

http://zobayer.blogspot.com/2013/02/divisor-function.html

GCD, LCM

Factorial

http://alavolacoder.blogspot.com/2013/04/factorial-facts.html

http://alavolacoder.blogspot.com/2013/04/factorial-facts_9.html

http://zobayer.blogspot.com/2009/07/factorial.html

Fibonacci

Counting, Permutation, combination

http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=combinatorics

Exponentiation

Modular Arithmetic

http://www.shafaetsplanet.com/planetcoding/?p=936

Euclid, Extended euclid

http://zobayer.blogspot.com/2009/07/extended-euclidean-algorithm.html

http://translate.googleusercontent.com/translate_c?act=url&depth=1&hl=en&ie=UTF8&prev=_t&rurl=translate.google.com&sl=auto&tl=en&twu=1&u=http://e-maxx.ru/algo/euclid_algorithm&usg=ALkJrhhkz3tb4aXWHeD8eIJvJCQhe-jn7Q

http://translate.googleusercontent.com/translate_c?act=url&depth=1&hl=en&ie=UTF8&prev=_t&rurl=translate.google.com&sl=auto&tl=en&twu=1&u=http://e-maxx.ru/algo/extended_euclid_algorithm&usg=ALkJrhgjyM7s9peFmIRPQqhXdBGE9-CeHw

Data Structure:

http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=dataStructures

Stack

http://alavolacoder.blogspot.com/2013/02/stack.html

Queue

http://alavolacoder.blogspot.com/2013/03/queue.html

Priority Queue

Linked list

http://alavolacoder.blogspot.com/2013/02/blog-post_19.html

http://alavolacoder.blogspot.com/2013/02/blog-post_24.html

http://zobayer.blogspot.com/2009/12/cse-102-linked-list-in-c.html

Heap

Hash table Disjoint Set, Union Find

http://www.shafaetsplanet.com/planetcoding/?p=763

http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=disjointDataStructure

Binary Search Tree

http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/binarySearchTree.htm

Trie, Suffix Array

http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=usingTries

Binary Indexed Tree(BIT)

http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=binaryIndexedTrees

Segmented Tree

http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=lowestCommonAncestor

http://www.shafaetsplanet.com/planetcoding/?p=1557

http://www.shafaetsplanet.com/planetcoding/?p=1591

Heavy Light decompositon

http://wcipeg.com/wiki/Heavy-light_decomposition

http://translate.googleusercontent.com/translate_c?act=url&depth=1&hl=en&ie=UTF8&prev=_t&rurl=translate.google.com&sl=auto&tl=en&twu=1&u=http://e-maxx.ru/algo/heavy_light&usg=ALkJrhjj3RdDbiiCaQoThkAzVfSqnJuJkA

Sorting:

http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=sorting

http://bongobani.blogspot.com/2010/06/blog-post_1625.html

Bubble Sort

http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/Sorting/bubbleSort.htm

Selection Sort

http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/Sorting/selectionSort.htm

Insertion Sort

http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/Sorting/insertionSort.htm

Shell Sort

http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/Sorting/shellSort.htm

Quick Sort

http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/Sorting/quickSort.htm

Merge Sort

http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/Sorting/mergeSort.htm

http://zobayer.blogspot.com/2010/08/merge-sort.html

http://zobayer.blogspot.com/2010/09/threaded-merge-sort.html

http://zobayer.blogspot.com/2010/11/merge-sort-improvement.html

Counting Sort

http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/Sorting/countingSort.htm

Radix Sort

http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/Sorting/radixSort.htm

Bucket Sort

http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/Sorting/bucketSort.htm

Heap Sort

http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/Sorting/heapSort.htm

Searching:

Linear Search

Binary Search

http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=binarySearch

Ternary Search

http://translate.googleusercontent.com/translate_c?act=url&depth=1&hl=en&ie=UTF8&prev=_t&rurl=translate.google.com&sl=auto&tl=en&twu=1&u=http://e-maxx.ru/algo/ternary_search&usg=ALkJrhgQ1I9JBNisS1NAVe5CcgYxCRhqtA

Map, HashMap

Dynamic Programming:

https://sites.google.com/site/smilitude/recursion_and_dp

http://www.codechef.com/wiki/tutorial-dynamic-programming

http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=dynProg

http://www.shafaetsplanet.com/planetcoding/?p=1022

http://www.shafaetsplanet.com/planetcoding/?p=1211

Rod Cutting

Maximum Sum (1D, 2D)

Coin Change

http://www.shafaetsplanet.com/planetcoding/?p=1158

https://sites.google.com/site/programinggconcept/algorithm

Longest Common Subsequence

Longest Increasing subsequence, Longest Decreasing Subsequence

Calculating nCr using DP

http://zobayer.blogspot.com/2009/08/calculate-ncr-using-dp.html

Matrix Chain multiplication

http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/Dynamic/chainMatrixMult.htm

Edit Distance

0-1 Knapsack

http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/Greedy/knapscakIO.htm

http://www.shafaetsplanet.com/planetcoding/?p=1072

https://sites.google.com/site/programinggconcept/0-1-knapsack

Bitmask DP

http://www.shafaetsplanet.com/planetcoding/?p=1357

Traveling Salesman problem

http://www.shafaetsplanet.com/planetcoding/?p=571

http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/AproxAlgor/TSP/tsp.htm

Digit DP

http://codeforces.com/blog/entry/7221

Greedy algorithm:

http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=greedyAlg

Activity selection/Task scheduling problem

http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/Greedy/activity.htm

Huffman coding

http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/Greedy/huffman.htm

http://zobayer.blogspot.com/2011/01/huffmans-code.html

Fractional knapsack problem

http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/Greedy/knapscakFrac.htm

Graph Theory:

https://sites.google.com/site/smilitude/shortestpath

https://sites.google.com/site/smilitude/shortestpath_problems

http://www.codechef.com/wiki/tutorial-graph-theory-part-1

http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=graphsDataStrucs1

http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=graphsDataStrucs2

http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=graphsDataStrucs3

Graph Representation(matrix, list/vector)

http://www.shafaetsplanet.com/planetcoding/?p=143

http://www.shafaetsplanet.com/planetcoding/?p=184

http://www.shafaetsplanet.com/planetcoding/?p=211

Breadth First Search(BFS)

http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/GraphAlgor/breadthSearch.htm

http://www.shafaetsplanet.com/planetcoding/?p=604

http://www.shafaetsplanet.com/planetcoding/?p=639

http://translate.googleusercontent.com/translate_c?act=url&depth=1&hl=en&ie=UTF8&prev=_t&rurl=translate.google.com&sl=auto&tl=en&twu=1&u=http://e-maxx.ru/algo/bfs&usg=ALkJrhinv0P87U0v_VXJhm3L6aGS5KEuPA

Depth First Search(DFS)

http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/GraphAlgor/depthSearch.htm

http://www.shafaetsplanet.com/planetcoding/?p=973

http://translate.googleusercontent.com/translate_c?act=url&depth=1&hl=en&ie=UTF8&prev=_t&rurl=translate.google.com&sl=auto&tl=en&twu=1&u=http://e-maxx.ru/algo/dfs&usg=ALkJrhiWHq30PgqeB1q11ZSAJrvMeOJksw

Bipartite Graph checking

http://zobayer.blogspot.com/2010/03/testing-bipartite-graph.html

Topological Sort

https://sites.google.com/site/smilitude/topsort

http://www.shafaetsplanet.com/planetcoding/?p=848

http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/GraphAlgor/topoSort.htm

http://translate.googleusercontent.com/translate_c?act=url&depth=1&hl=en&ie=UTF8&prev=_t&rurl=translate.google.com&sl=auto&tl=en&twu=1&u=http://e-maxx.ru/algo/topological_sort&usg=ALkJrhhAS83fGpkoZIfziKQZIpYQy4JZ9A

Strongly Connected Component(SCC)

http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/GraphAlgor/strongComponent.htm

http://translate.googleusercontent.com/translate_c?act=url&depth=1&hl=en&ie=UTF8&prev=_t&rurl=translate.google.com&sl=auto&tl=en&twu=1&u=http://e-maxx.ru/algo/strong_connected_components&usg=ALkJrhip3cmRxf-Uk_1COz-PHg57GuwEGg

Minimum Spanning Tree(MST)

Kruskal’s Algorithm

http://www.shafaetsplanet.com/planetcoding/?p=692

http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/GraphAlgor/kruskalAlgor.htm

http://zobayer.blogspot.com/2010/01/kruskals-algorithm-in-c.html

Prim’s Algorithm

http://www.shafaetsplanet.com/planetcoding/?p=825

http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/GraphAlgor/primAlgor.htm

http://www.graph-magics.com/articles/min_spantree.php

Directed MST

http://www.ce.rit.edu/~sjyeec/dmst.html

All pair's shortest path(Floyd Warshall)

http://www.graph-magics.com/articles/all_shortest_paths.php

http://translate.googleusercontent.com/translate_c?act=url&depth=1&hl=en&ie=UTF8&prev=_t&rurl=translate.google.com&sl=auto&tl=en&twu=1&u=http://e-maxx.ru/algo/floyd_warshall_algorithm&usg=ALkJrhgoQbn-45TnSyPYBa0T2o__DDuJSw

Djkastra algorithm

http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/GraphAlgor/dijkstraAlgor.htm

http://www.shafaetsplanet.com/planetcoding/?p=1500

http://zobayer.blogspot.com/2009/12/dijkstras-algorithm-in-c.html

Bellman Ford Algorithm

http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/GraphAlgor/bellFordAlgor.htm

Directed Acyclic Graph

Bipartite Matching

http://zobayer.blogspot.com/2010/05/maximum-matching-with-dfs.html

http://zobayer.blogspot.com/2010/05/maximum-matching.html

Max-Flow, Min-cost max-flow

http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=maxFlowRevisited

Cayley's Theorem Articulation Point

http://translate.googleusercontent.com/translate_c?act=url&depth=1&hl=en&ie=UTF8&prev=_t&rurl=translate.google.com&sl=auto&tl=en&twu=1&u=http://e-maxx.ru/algo/cutpoints&usg=ALkJrhiSuFiBqY_EBgCC68vfrvW2o5vZnA

Bridge

http://translate.googleusercontent.com/translate_c?act=url&depth=1&hl=en&ie=UTF8&prev=_t&rurl=translate.google.com&sl=auto&tl=en&twu=1&u=http://e-maxx.ru/algo/bridge_searching&usg=ALkJrhjv4XdY8Jh7vYLW0UbVsCIgscwhWg

Euler tour/path

http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/GraphAlgor/eulerTour.htm

http://zobayer.blogspot.com/2010/06/euler-tour.html

http://www.graph-magics.com/articles/euler.php

http://translate.googleusercontent.com/translate_c?act=url&depth=1&hl=en&ie=UTF8&prev=_t&rurl=translate.google.com&sl=auto&tl=en&twu=1&u=http://e-maxx.ru/algo/euler_path&usg=ALkJrhhfu-QYqtQCLEcIXxB-nQ1lbebqvw

Hamiltonian Cycle

Stable Marriage problem

http://www.shafaetsplanet.com/planetcoding/?p=1187

Chinese Postman problem

Minimum Vertex Cover(Graph+DP)

http://www.shafaetsplanet.com/planetcoding/?p=582

http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/AproxAlgor/vertexCover.htm

Number Theory:

Josephus Problem

http://en.wikipedia.org/wiki/Josephus_problem

http://www.cut-the-knot.org/recurrence/flavius.shtml

http://translate.googleusercontent.com/translate_c?act=url&depth=1&hl=en&ie=UTF8&prev=_t&rurl=translate.google.com&sl=auto&tl=en&twu=1&u=http://e-maxx.ru/algo/joseph_problem&usg=ALkJrhgMHDKM8tt5iI-GjN79rqFrWqWtFg Farey Sequence,Stern-brocot Tree

http://translate.googleusercontent.com/translate_c?act=url&depth=1&hl=en&ie=UTF8&prev=_t&rurl=translate.google.com&sl=auto&tl=en&twu=1&u=http://e-maxx.ru/algo/stern_brocot_farey&usg=ALkJrhgnF7douyHovchr9Cid9vqFp4yuZw

Catalan numbers

http://en.wikipedia.org/wiki/Catalan_number

http://translate.googleusercontent.com/translate_c?act=url&depth=1&hl=en&ie=UTF8&prev=_t&rurl=translate.google.com&sl=auto&tl=en&twu=1&u=http://e-maxx.ru/algo/catalan_numbers&usg=ALkJrhhRH_RJQQbF1YaUhncPRlLVkzJQYw

Euler's phi

http://zobayer.blogspot.com/2013/02/euler-totient-function.html

http://translate.googleusercontent.com/translate_c?act=url&depth=1&hl=en&ie=UTF8&prev=_t&rurl=translate.google.com&sl=auto&tl=en&twu=1&u=http://e-maxx.ru/algo/euler_function&usg=ALkJrhidn-VzTqkKA2YBticLAs-ZDj_LKg

Burnside's lemma/circular permutation

http://translate.googleusercontent.com/translate_c?act=url&depth=1&hl=en&ie=UTF8&prev=_t&rurl=translate.google.com&sl=auto&tl=en&twu=1&u=http://e-maxx.ru/algo/burnside_polya&usg=ALkJrhhc0pVhgwbXKi01y2l8Ve8IOiSlxg

Modular inverse

https://www.facebook.com/notes/emtiaj-hasan/%E0%A6%AE%E0%A6%A1-%E0%A6%A8%E0%A6%BF%E0%A7%9F%E0%A7%87-%E0%A6%AE%E0%A6%A1%E0%A6%B0-%E0%A6%AE%E0%A6%A1%E0%A6%B0-%E0%A6%87%E0%A6%A8%E0%A6%AD%E0%A6%BE%E0%A6%B0%E0%A7%8D%E0%A6%B8-%E0%A6%AE%E0%A6%A1%E0%A7%87%E0%A6%B0-%E0%A6%B8%E0%A6%BE%E0%A6%A5%E0%A7%87-%E0%A6%B8%E0%A6%BF-%E0%A6%86%E0%A6%B0-%E0%A6%9F%E0%A6%BF-%E0%A6%B0-%E0%A6%95%E0%A6%9A%E0%A6%95%E0%A6%9A%E0%A6%BE%E0%A6%A8%E0%A6%BF/448341041903611

Probability

http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=probabilities

Chinese Remainder Theorem

http://translate.googleusercontent.com/translate_c?act=url&depth=1&hl=en&ie=UTF8&prev=_t&rurl=translate.google.com&sl=auto&tl=en&twu=1&u=http://e-maxx.ru/algo/chinese_theorem&usg=ALkJrhhib5yTDIZ1VJE7vt1YuEMWyuOm0A

Gaussian Elmination method

http://zobayer.blogspot.com/2009/12/gaussjordan-elimination.html

Dilworth's Theorem

Matrix Exponentiation

http://zobayer.blogspot.com/2010/11/matrix-exponentiation.html

Determinant of a matrix

RSA public key crypto System

Computation Geometry:

http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=geometry1

http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=geometry2

http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=geometry3

http://www.personal.kent.edu/~rmuhamma/Compgeometry/compgeom.html

Pick's Theorem Convex hull

http://zobayer.blogspot.com/2010/02/convex-hull.html

Line Intersection

Segment circle intersection

http://zobayer.blogspot.com/2009/11/geometry-segment-circle-intersection.html

Point in a polygon

Area of a polygon

Line Sweeping

http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=lineSweep

Polygon intersection

Closest Pair

Game Theory:

http://potasiyam.com/farsan/

Take Away game

http://zobayer.blogspot.com/2010/08/simple-take-away-game.html

Nim

Sprague-grundy Number

String:

http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=stringSearching

http://doinik-iut.com/archives/23106

Naive String matching

http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/StringMatch/naiveStringMatch.htm

Rabin karp Algo

http://www.infoarena.ro/blog/rolling-hash

Finite Automata

Knuth-Marris-Pratt Algo

http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/StringMatch/kuthMP.htm

Manacher's Algo

Aho korasick's Algo

Boyer-Moore Algorithm

http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/StringMatch/boyerMoore.htm

Others:

Recursion

http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=recursionPt1

http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=recursionPt2

http://zobayer.blogspot.com/2009/12/cse-102-attacking-recursion.html

http://zobayer.blogspot.com/2009/12/cse-102-practice-recursions.html

Backtracking

http://www.shafaetsplanet.com/planetcoding/?p=1266

http://www.academic.marist.edu/~jzbv/algorithms/Backtracking.htm

Hungarian Algorithm

http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=hungarianAlgorithm

C++ STL(Standard Template Library)

https://sites.google.com/site/smilitude/cpp

https://sites.google.com/site/smilitude/stl

http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=standardTemplateLibrary

http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=standardTemplateLibrary2

Bitwise operations

http://www.codechef.com/wiki/tutorial-bitwise-operations

http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=bitManipulation

http://zobayer.blogspot.com/2009/12/bitwise-operations-in-cc-part-1.html

http://zobayer.blogspot.com/2009/12/bitwise-operations-in-c-part-2.html

http://zobayer.blogspot.com/2009/12/bitwise-operations-in-c-part-3.html