Вы находитесь на странице: 1из 15

Answer written

Algorithms
2014

What are the algorithms required to solve all


problems (using C++) in any competitive coding
contest?
Amit Rai, Algorithm Enthusiast, Hindi Poetry Lover
85k Views

Mathematics:
(a)Number Theory

1. Prime Number Generation (Sieve, Segmented Sieve)


2. Euler Totient Theorem
3. Fermats Theorem
4. HCF & LCM (Euclid)
5. Linear Diophantine Equations (Extended Euclid)
6. Modulus Arithmetic (addition,multiplication,subtraction,modular Inverse)
7. Cycle Finding (Floyd Algo and Brent Algo)
8. Integer Factorization (Trial Division , Pollard Rho method)
9. Lucas Theorem (Simple & Advance)
10. Chinese Remainder Theorem
11. Wilson Theorem
12. Miller - Rabin Primality Testing
13. Perfect Numbers
14. Goldbach Conjecture
(b)Probability

1.
2.
3.
4.
5.

Basic Probability and Conditional Probability


Random Variables
Probability Generating Functions
Expectation
Probability Distribution [Binomial, Poisson, Normal,Bernoulli]

(c)Counting

1. Pigeonhole principle
2. Inclusion Exclusion
3. Special Numbers [Stirling,Fibonacci,Catalan, Eulerian, Harmonic, Bernoulli]
4. Polya Counting
5. Burnside lemma
(d)Permutation Cycles
(e)Linear Algebra

1. Addition And Subtraction Of Matrices


2. Multiplication ( Strassen's algorithm ), Logarithmic exponentiation
3. Matrix Transformations [ Transpose, Rotation Of Matrix, Representing Linear
Transformations Using Matrix ]
4. Determinant , Rank and Inverse Of Matrix [ Gaussian Elimination , Gauss
Jordan Elimination]
5. Solving System Of Linear Equations
6. Matrix Exponentiation To Solve Recurrences
7. Eigenvalues And Eigen vector
8. Roots of a polynomial [ Prime factorization of a polynomial, Integer roots of a
polynomial]
9. Lagrange Interpolation
(e)Game Theory

1. Basic Concepts & Nim Game [Grundy Theorem , Grundy Number]


2. Hackenbush
(f)Group Theory

1. Burnside Lemma
2. Polya's Theorem
Graphs:
(a)Graph Representation

1. Adjacency Matrix

2. Adjacency List
3. Incidence Matrix
4. Edge List
(b)Graph Types

1. Directed
2. Undirected
3. Weighted
4. Unweighted
5. Planar
6. Hamilton
7. Euler
8. Special Graphs
(c)DFS & Its Application

1. Cycle Detection
2. Articulation Points
3. Bridges
4. Strongly Connected Component
5. Connected Component
6. Path Finding
7. Solving Maze
8. Biconnectivity in Graph
9. Topological Sorting
10. Bipartite Checking
11. Planarity Testing
12. Flood-fill algorithm
(d)BFS & Its Application

1. Shortest Path (No. Of Edges)


2. Bipartite Checking
3. Connected Components
(d)Minimum Spanning Tree

1. Prims Algorithm
2. Kruskal Algorithm

(d)Single Source Shortest-Path

1. Dijkstra
2. Bellman Ford
(e)All pair Shortest Path

1. Floyd Warshalls Algorithm


(f)Euler Tour
(g)Flow

1. Ford-Fulkerson [PFS,DFS,BFS]
2. Dinic's Algorithm
3. Min Cost - Max Flow [Successive Shortest Path Algo,Cycle Cancelling
Algorithm]
4. Max Weighted BPM [Kuhn Munkres algorithm/Hungarian Method]
5. Stoer Wagner Min-Cut Algo
6. Hop-Kraft BPM
7. Edmond Blossom Shrinking Algorithm
(h)Other Important Topics On Graphs

1. 2-SAT,
2. LCA
3. Maximum Cardinality Matching
4. Application Flow
5. Min Path Cover Over Dag
6. Independent Edge Disjoint Path
7. Minimum Vertex Cover
8. Maximum Independent Set
Data Structures:

1. Arrays
2. Linked List
3. Trees (Binary Tree And Binary Search Tree)
4. Stacks
5. Queues

6. Heap
7. Hash Tables
8. Disjoint-Set Data Structures
9. Trie
10. Segment Tree
11. Binary Index Tree
12. Treap
Searching And Sorting:

1. Linear Search
2. BInary Search
3. Ternary Search
4. Selection Sort
5. Bubble Sort
6. Insertion Sort
7. Merge Sort
8. Quick Sort
9. Quick Select
10. Heap Sort
11. Radix Sort
12. Counting Sort
Greedy:
Classical Problems of Greedy & Concept
example : Fractional Knapsack

Dynamic Programming Classical Problems

1. Edit Distance
2. Egg Dropping Puzzle
3. Integer Knapsack
4. Largest Independent Set
5. Longest Biotonic Subsequence
6. Longest Common Subsequence
7. Longest Common Substring
8. Longest Increasing Subsequence

9. Longest Palindromic Subsequence


10. Longest Palindromic Substring
11. Longest Substring Without Repeating Character
12. Matrix Chain Multiplication
13. Max Size Square Submatrix With One
14. Maximum Length Chain Pairs
15. Maximum Sum Increasing Subsequence
16. Optimal Binary Search Tree
17. Palindrome Partition Problem
18. Set Partition Problem
19. Subset Sum
20. Word Wrap Problem
Dynamic Programming Advanced Techniques

1. DP + Tree
2. DP + Bit Masking
3. DP + Binary Search
4. DP + Graph
5. DP + Matrix Exponentiation
6. DP + Probability Space
7. DP + Crack Recurrence
Divide & Conquer
Classical Problems & Concepts

1. Merge Sort
2. Closest Pair Points
Other Algorithm Design Techniques :

1. BackTracking
2. Man In Middle
3. Newton-Raphson to reach the fixed point
4. Brute Force
5. Constructive Algo
6. Sliding Window
7. Pancake Sorting

Resources:
Data Structures And Algorithm :
Algorithm Tutorials
Data Structures and Algorithms
Modular Multiplicative Inverse
Heavy Light Decomposition
Tutorial: Range Updates in Fenwick Tree by Amey Dharwadker on
Programming Contests
visualising data structures and algorithms through animation
Coding contest trick: Meet in the middle
Introduction to Dynamic Programming
Dynamic Programming Practice Problems
Solving Linear Recurrence for Programming Contest
Tutorial on Trie and example problems by Lalit Kundu on Threads @ IIIT Hyderabad
Binary Indexed Trees with some Solved Example.
Dynamic programming problems with bitmasking
Let us code: Segment Trees
C++:
C++ Programming Tutorial
Containers - C++ Reference
Standard Template Library Programmer's Guide
Updated with few more links.
Updated Apr 15, 2015 View Upvotes
Upvote2.2k Downvote
Comments16+
Sha re

View 12 Other Answers to this Question

Ask Question

Read

Answer

Notifications

Avadhani

Feeds
Edit

Top Stories
Bookmarked Answers
Cloud Computing
Computer Security
Operating Systems
Python (programming language)
Algorithms

Trending Now

Dipa Karmakar Qualifies for Rio Olympics Vault Finals


Rustom

Algorithms
Answer written
Algorithms
Aug 6

How do I use algorithms and data structure in real life?

Mohammad I, CSE from IITK, 20+ years of coding in C/C++/Java, Ex-Microsoft


32.6k Views Most Viewed Writer in Algorithms

Real life? Sure!


1. Befriending someone on FB? Breadth First Search.
2. Writing her a letter? Sign.
3. Thats a love letter? Encrypt. Sign.
4. You two in classroom? Compress. Encrypt. Sign.
5. Prof. noticed and you ru...
(more)
Upvote1.5k Downvote
Comments19
Sha re

Question asked
Algorithms
Tue

I am currently researching web usage mining techniques to design my


own algorithm. Where can I find a source of real implementation of the
web mining algorithms? What is currently the most used web log file
format?
Answer
Pass
Follow12
Downvote
Answer written
Algorithms
Tue

I developed an algorithm that makes 13% per day. What's next?

Yoni Friedman, Israeli, Modern Orthodox Jew, mech. engineer, creative writer, economics
buf
9.2k Views Yoni has 30+ answers in Stock Market

Step 1: invest $5000 in your algorithm.


Step 2: wait for a year.
You now should have roughly $11,820, 000,000,000,000,000,000 at your disposal
Step 3: take over the world.
Try not to be tempted to buy ...
(more)
Upvote380 Downvote
Comments4+
Sha re

Answer written

Algorithms
Jul 31

How do giant sites like Reddit verify that a username isn't taken so
fast?

Luis Argerich, I teach Computer Science at the University of Buenos Aires (UBA).
71k Views Most Viewed Writer in Algorithms with 120+ answers

Surprised there has been only one mention of a Bloom Filter so far.
A Bloom filter is practically perfect for this application, lets see why.
Using a Bloom filter you have a big array of bits and a ...
(more)
Upvote805 Downvote
Comments11+
Sha re

Answer written
Algorithms
Aug 7

What is the criteria for a solution to be accepted at SPOJ?

Vinay Singh, GNU/Linux enthusiast. Hobbyist Photographer. CS teacher by profession.


106 Views

Your program must:


1. Produce the correct output for their inputs. Note that these inputs are
considerably different than the ones mentioned in the problem definition, include
borderline cases. Output ...
(more)
Upvote Downvote
Comment
Sha re

Answer written
Algorithms
Aug 9

Which sorting algorithms have the least best case complexity?

Sasha Krassovsky, Programming enthusiast


334 Views

The algorithm with the best case complexity is the NoSort algorithm: it returns the input
list. Of course, that only works in the case that the input list is sorted, but it has a complexity
of 0.
No...
(more)
Upvote Downvote
Comment
Sha re

Answer written
Algorithms
2014

What are the algorithms required to solve all problems (using C++) in
any competitive coding contest?

Amit Rai, Algorithm Enthusiast, Hindi Poetry Lover


85k Views

Mathematics:
(a)Number Theory
1. Prime Number Generation (Sieve, Segmented Sieve)
2. Euler Totient Theorem...
(more)
Upvote2.2k Downvote
Comments16+
Sha re

Answer written
Dynamic Programming (DP)
Jul 19

What is the smartest, weirdest, most elegant coding solution to a


problem you've ever come across?

Satwant Rana, Purple Coder


8.2k Views Most Viewed Writer in TopCoder

This one blew me away when I encountered it for the first time.
Given an array of (positive) integers, where each integer in the array shows up twice in the
array, except for one integer, which show...
(more)
Upvote251 Downvote
Comments5+
Sha re

Answer written
Algorithms
Jul 28

How do I master algorithms?

Rahul Arora, Student, Passionate programmer


270 Views

Start from the very basic algorithms like searching and sorting. Understand their time and
space complexities. Once you get comfortable with them, then start practising on
competitive programming w...
(more)
Upvote4 Downvote
Comment
Sha re

Answer written
Algorithms
Jul 28

What are some good sources to learn about greedy algorithms?

Rushikesh Dharmadhikari, A Computer Science enthusiast.


271 Views

Geeksforgeeks has a good collection of standard greedy algorithms Greedy Algorithms | Set
1 (Activity Selection Problem) - GeeksforGeeks .
Some other tutorials I found interesting are
Greedy is Good - topcoder...
(more)
Upvote2 Downvote
Comment
Sha re

Answer written
Algorithms
Jul 20

Am I a bad Software Engineer if I can not implement sorting algorithms


from the top of my head?

Manohar Poreddy, Algorithms Addict, Generic Problem Solver, Top 200 in 3 months,
Sr.SDM,P.Ar,P.E

1.3k Views

1. Dont bubble sort. Learn Insertion sort.


a. Make notes in your own words
i.
So that you can recall the algorithm easily.
b. Code the Insertion sort in a favorite programming language
c. Re-Code the Insertion sort ...
(more)
Upvote7 Downvote
Comment
Sha re

Question asked
India
9h

How can I get an ISBN number in India?


I am based in India. I have written a book and want to self-publish with my own publishing
company.
... (more)
Read 9 Answers
Answer
Pass
Follow22
Downvote
Answer written
Software Engineering
Aug 10

What are the top 10 algorithms every software engineer should know by
heart?

Gregory Schoenmakers, I have coded algorithms for a long time.


3.2k Views

I would say that it is more important to understand concepts such as recursion, looping,
conditional statements and data structures such as arrays, linked lists and trees than any
particular algorithm.
Upvote26 Downvote
Comment1
Sha re

Answer written
Algorithms
Jul 29

Should I choose genetic algorithms or neural networks for an


optimization problem?

Carlos Soto, PhD. student in computer science and knows about genetic algorithms
303 Views

Use Genetic Algorithms (GA) which are for optimization problems. Neuronal Networks
(NN) are for prediction and classification. Also, the NN requieres a set of data to be trained.
GA are more suitab...
(more)
Upvote2 Downvote
Comment
Sha re

Answer written
Algorithms
Jul 20

What is the special algorithm used in the app Prisma?

BrainMobi Technologies, Creating Next Generation Mobile Application


2.7k Views

Unlike some apps that merely apply light and color filters to images, Prisma claims to use a
combination of neural networks and artificial intelligence to take the art styles of famous
artists such...
(more)
Upvote25 Downvote

Comment
Sha re

Most Viewed WritersView All

Tim Farage, I teach Computer Science at The University of Texas at Dallas.


408,736 Views

Paul K. Young
195,822 Views

Luis Argerich, I teach Computer Science at the University of Buenos Aires (UBA).
78,950 Views

Вам также может понравиться