Computational Thinking and Programming

Lesson Divide and conquer algorithms

Divide and Conquer algorithms

  • Divide and conquer is an algorithmic strategy that breaks down a problem into smaller subproblems, solves them recursively, and then combines the results to form the solution. This approach is efficient, especially for sorting algorithms like merge sort, introduced by John von Neumann in 1945. Merge sort splits the input list into two halves, sorts them recursively, and merges the results. The technique ensures better performance on large datasets compared to simpler algorithms like insertion sort.
  • Recommended reading:
  • Divide and Conquer: An algorithmic strategy that splits a problem into subproblems, solves them recursively, and combines the results.
  • Merge Sort: A sorting algorithm that uses divide and conquer to sort lists efficiently by splitting, sorting, and merging.
  • Base Case: The simplest scenario in recursion that stops further splitting of the problem.
  • Recursive Step: The part of the algorithm where the problem is divided into smaller subproblems.
  • Mutable and Immutable Values: Mutable objects can be changed, while immutable objects cannot, impacting how values are handled in algorithms.
  • Floor Division: Division that returns the integer part of the quotient, used to split lists in divide and conquer.