- Exemplify (Investigation): Understand problem by creating minimum two examples of the algorithm. Use this step to create test-inputs.
- Algo Pattern: Identify the similar algorithms (or patterns of algorithms) that you've encountered previously. Use this step to identify best applicable data-structure.
- Data Structure Brainstorm: This is hit and trial method. Try fitting relevant data structure till you find the best match. There are far better techniques for choosing it as well (watch this space and I shall update it shortly).
- Simplify and Generalize (Divide and Conquer): Break-down the big problem into smaller fragments. Use this step to modularize.
- Base case and Build: Identify base case (eg. just one element case) for algorithm behavior and start from there.
- Algo Features: Keep a check on sequence, decision, repetition and Asymptotic Complexity (Big O notation)
Saturday, March 26, 2016
Tips for approaching Algorithmic problems
Subscribe to:
Posts (Atom)