Introduction to Algorithms in JavaScript

Tyler Clark
InstructorTyler Clark
Share this video with your friends

Social Share Links

Send Tweet
Published 5 years ago
Updated 5 years ago

Algorithms are methods that take data, perform a series of tasks, and stop when the answer is found. They’re used in day to day problems and teach you that large problems can be broken down into smaller problems. Sometimes we try to tackle obstacles head on and become lost in a tangle of if checks. Instead we should take a step back and figure out, what is the root problem and how can we write a maintainable solution that will scale proficiently.

Instructor: [00:00] Thanks for watching my course about algorithms in JavaScript. You might have heard of algorithms in school, at work, or just in passing, but what really is an algorithm?

[00:09] Algorithms are methods that take input or data, perform a series of tasks, and stop when the answer is found. They're used in day-to-day problems like finding the shortest distance to work and used to calculate the best response to your Google search.

[00:23] Though not all algorithms are created equal, it's important to not only know which one to choose when faced with a problem, but the true power is understanding how the algorithm works itself.

[00:34] Maximizing your application's time and space can sometimes make or break your system. Some algorithms perform better than others. Some can be implemented incorrectly, leading you astray. We review many different types of algorithms, including sorting, searching, and breaking down complex problems. We implement recursion, loops, and classify items.

[00:55] The algorithms shown in this course barely scratch the surface, though. There's so many and each have their pros and cons.

[01:02] In this course, we speak a lot about Big-O notation. Big-O notation is a special notation that tells you how fast an algorithm is. What does that really mean? It does not tell you how fast in seconds your algorithm will run to completion.

[01:17] No, it lets us compare the number of operations it will make. It tells you how fast the algorithm will grow. It defines how quickly the runtime of an algorithm increases as the size of the input increases. Essentially, Big-O tells us the worst case scenario our algorithm will run at.

[01:35] In this course, we work with slow Big-O notation algorithms and selection sort and extremely fast Big-O notations like binary search.

[01:43] In the end, what I want you to take away from this course is a new way to face problems. Algorithms teach you that large problems can be broken down into smaller problems.

[01:52] Sometimes we try to tackle problems head on and become lost in a tangle of if/else checks. Instead, we should take a step back and figure out, what is the root problem? How can we write a maintainable solution that will scale efficiently?

egghead
egghead
~ 8 minutes ago

Member comments are a way for members to communicate, interact, and ask questions about a lesson.

The instructor or someone from the community might respond to your question Here are a few basic guidelines to commenting on egghead.io

Be on-Topic

Comments are for discussing a lesson. If you're having a general issue with the website functionality, please contact us at support@egghead.io.

Avoid meta-discussion

  • This was great!
  • This was horrible!
  • I didn't like this because it didn't match my skill level.
  • +1 It will likely be deleted as spam.

Code Problems?

Should be accompanied by code! Codesandbox or Stackblitz provide a way to share code and discuss it in context

Details and Context

Vague question? Vague answer. Any details and context you can provide will lure more interesting answers!

Markdown supported.
Become a member to join the discussionEnroll Today