ALGORITHM STRATEGIES IN C++ Selecting the best case for your Data processing Jawad Ali
Algorithms we normally use • Complete Search • Greedy • Divide and Conquer • Dynamic Programming
Complete Search • Complete search is a method for solving a problem by traversing the entire search space in search of a solution. Example: • brute force • RecursiveTracking • Back Propagation in complete dataset Used in • User Names • Unique Keys • Directories and hashing • Concurrent programming • Bubble sort and bubble effects
Greedy • A greedy algorithm takes a locally optimum choice at each step with the hope of eventually reaching a globally optimal solution.Greedy algorithms often rely on a greedy heuristic and one can often find examples in which greedy algorithms fail to achieve the global optimum. • Always choosing the next piece that offers the most obvious and immediate benefit • Mostly never reaches the goal in case of larger dataset • Example: • The knapsack problem • Heuristic Hit and trial search Used in • Machine learning • Networking and connectivity • Resource allocation • Eating maximum candies
Divide and Conquer • A problem is divided into smaller, independent sub-problems and then combines solutions to each of the sub-problems. • Example: • Quick sort • Merge sort • Heap sort • Binary search Used in • Search and sort • Minimal calculation steps
Dynamic Programming • Dynamic Programming (DP) is a technique that divides a problem into smaller overlapping sub-problems, computes a solution for each sub-problem and stores it in a DP table.The final solution is read off the DP table. • It is a non-aftereffect, overlapping and optimal way to solve a problem • It is a semi-independent, event driven programming technique • Example: • Sequential programming with inline functions • Distributed functions • Map-reduce functions • Clustering Used in State transition processes Distributed computing with central collection node Edge computing Blockchain Big Data handling Preparing a meal

Algorithm strategies in c++

  • 1.
    ALGORITHM STRATEGIES IN C++ Selectingthe best case for your Data processing Jawad Ali
  • 2.
    Algorithms we normallyuse • Complete Search • Greedy • Divide and Conquer • Dynamic Programming
  • 3.
    Complete Search • Completesearch is a method for solving a problem by traversing the entire search space in search of a solution. Example: • brute force • RecursiveTracking • Back Propagation in complete dataset Used in • User Names • Unique Keys • Directories and hashing • Concurrent programming • Bubble sort and bubble effects
  • 4.
    Greedy • A greedyalgorithm takes a locally optimum choice at each step with the hope of eventually reaching a globally optimal solution.Greedy algorithms often rely on a greedy heuristic and one can often find examples in which greedy algorithms fail to achieve the global optimum. • Always choosing the next piece that offers the most obvious and immediate benefit • Mostly never reaches the goal in case of larger dataset • Example: • The knapsack problem • Heuristic Hit and trial search Used in • Machine learning • Networking and connectivity • Resource allocation • Eating maximum candies
  • 5.
    Divide and Conquer •A problem is divided into smaller, independent sub-problems and then combines solutions to each of the sub-problems. • Example: • Quick sort • Merge sort • Heap sort • Binary search Used in • Search and sort • Minimal calculation steps
  • 6.
    Dynamic Programming • DynamicProgramming (DP) is a technique that divides a problem into smaller overlapping sub-problems, computes a solution for each sub-problem and stores it in a DP table.The final solution is read off the DP table. • It is a non-aftereffect, overlapping and optimal way to solve a problem • It is a semi-independent, event driven programming technique • Example: • Sequential programming with inline functions • Distributed functions • Map-reduce functions • Clustering Used in State transition processes Distributed computing with central collection node Edge computing Blockchain Big Data handling Preparing a meal

Editor's Notes

  • #2 Are your classroom colors different than what you see in this template? That’s OK! Click on Design -> Variants (the down arrow) -> Pick the color scheme that works for you! Feel free to change any “You will…” and “I will…” statements to ensure they align with your classroom procedures and rules!
  • #3 Many algorithmic problems can be mapped into one of these four categories and the mastery of each one will make you a better programmer.
  • #4 https://towardsdatascience.com/algorithms-in-c-62b607a6131d
  • #7 https://aip.scitation.org/doi/pdf/10.1063/1.4982520