Check out a free preview of the full A Practical Guide to Algorithms with JavaScript course

The "Divide & Conquer Review" Lesson is part of the full, A Practical Guide to Algorithms with JavaScript course featured in this preview video. Here's what you'd learn in this lesson:

Bianca reviews divide and conquer.


Transcript from the "Divide & Conquer Review" Lesson

>> Bianca Gandolfo: So divide and conquer, the idea of divide and conquer is it's a recursive algorithm. We're always going to be working on sub problems. And so the divide part is we break it down in each call, and the conquer part is we're gonna do work on each subset.

So whether that work means that we are going to be searching for something, searching for a match or getting it into a correct order for doing sorts, which we'll talk about in a bit. And then there's the combine step, which depending on the divide and conquer algorithm, the combine step can look a few different ways.

Emerge sort, the combine step is really clear, whereas, in something like binary search, the combine step is kind of skipped. It's not really a crucial part of the algorithm.

Learn Straight from the Experts Who Shape the Modern Web

  • In-depth Courses
  • Industry Leading Experts
  • Learning Paths
  • Live Interactive Workshops
Get Unlimited Access Now