If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Where to go from here

Did you get through all of that content? Congratulations! You've learnt the fundamentals of algorithms, plus a lot of example algorithms.
There is much more to learn, if you want to dig deeper. Just look at Wikipedia's list of algorithms - there are thousands of them out there, plus there are the ones in your head that haven't made it into programs yet.
Thomas Cormen, co-author of this content, has also co-authored two books on algorithms:
  • Introduction to Algorithms: This is the most popular college textbook for algorithms. It is both rigorous—proving that algorithms are correct and have the claimed running times—and comprehensive—covering dozens of algorithms in over 1300 pages.
  • Algorithms Unlocked: This is targeted more at readers who want to get a taste of algorithms and how to analyze them. It's less mathematical than Introduction to Algorithms, and it includes a little more in the way of intuition and applications.
Other recommended books are The Algorithm Design Manual and Algorithm Design.
There are also several free 2-part courses offered online on Coursera:
  • Algorithms, I & II: An introductory course covering "basic iterable data types, sorting, and searching algorithms in Java".
  • Algorithms: Design and Analysis Part I & II: An introductory course that covers the "fundamental principles of algorithm design: divide-and-conquer methods, graph algorithms, practical data structures, randomized algorithms, and more" while being language agnostic.
We do plan to keep adding to this content here on Khan Academy, so check back here every few months for updates.

This content is a collaboration of Dartmouth Computer Science professors Thomas Cormen and Devin Balkcom, plus the Khan Academy computing curriculum team. The content is licensed CC-BY-NC-SA.

Want to join the conversation?

  • blobby green style avatar for user JIM CHI
    What other subject do I need to study if I want to major in computer in the future,I'm in high school,for now
    (14 votes)
    Default Khan Academy avatar avatar for user
    • piceratops ultimate style avatar for user rytan451
      I would recommend training yourself by implementing various data structures and algorithms that you may find on Wikipedia. Good data structures to begin researching on include stacks, queues, linked lists and heaps. The concept of circular arrays will also be helpful.
      Also, you should learn about the basic concepts behind Object Oriented Programming (OOP). You should understand the meaning of levels of abstraction, and be able to use recursion effectively.
      Furthermore, you should practice figuring out the order of growth in both space and time of various algorithms just by looking through an implementation of it.
      In my experience, a first-term course would spend the first nearly the half of the term teaching the specifics of the programming language that will be used in the majority of the course, as well as the basic concepts behind OOP, and Abstract Data Types (ADTs). The second term was more about the implementation of ADTs, Dynamic Programming, and further elaboration on OOP.
      With this preparation, and if you are able to code quickly and debug effectively, you will have no problem getting an 'A' on that first term course.
      (32 votes)
  • blobby green style avatar for user apurva.0310
    Are you guys planning for adding database managemeny system?
    (6 votes)
    Default Khan Academy avatar avatar for user
  • winston default style avatar for user jherdlein
    I'm not sure if you've noticed this, but categorized under Computer Programming is a course "Intro to SQL: Querying and managing data" which is about databases
    (5 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user shubhampatwarika
    I want to learn data structure in khan academy how to get it?
    (4 votes)
    Default Khan Academy avatar avatar for user
  • spunky sam green style avatar for user Taha Anouar
    where's the mathematics of computer i didn't found it her !!
    (1 vote)
    Default Khan Academy avatar avatar for user
    • piceratops seed style avatar for user dhruvd
      Generally, understanding computers require probability, algebra, and basic operations with numbers. If go into robotics or AI, you might need more advanced math,
      In general, the Khan Academy math modules is all you need.
      I always able to program just know basic algebra when I began.
      (4 votes)
  • blobby green style avatar for user adheesha.rathnasinghe
    what are the container data structures?
    (3 votes)
    Default Khan Academy avatar avatar for user
  • duskpin ultimate style avatar for user trungdo3224
    What if I have gone through all contents but haven't fully understood. Should I go through all again, or find some other sources to relearning and practicing, then keep learning more algorithms?
    (2 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user sadia.zafar0
    how can we write algorithm for reading numbers with in the range using case logic
    (1 vote)
    Default Khan Academy avatar avatar for user
    • piceratops ultimate style avatar for user rytan451
      I am assuming that you want to do something like this:
      switch (number) {
      case range(1, 10):
      // Do something
      break;
      }

      I'm afraid it's impossible in JavaScript, but it is possible to do something similar using if, else if, and else statements.
      (3 votes)
  • area 52 yellow style avatar for user Avi
    Thank you!

    What's the best and average case for searching for an element in a doubly linked list? Theta of N or O of N
    (1 vote)
    Default Khan Academy avatar avatar for user
    • male robot hal style avatar for user Cameron
      Best case = you find the element in the first node
      Which is both O(1) AND Theta(1)

      Average case:
      Each node in a list of size n is equally likely to hold the target. Cost of search for the xth element in the list is x.
      So, average cost is:
      Cost = 1/n * (1 + 2 + 3 + ... n)
      Cost = 1/n * (n+1)* n/2 = (n+1)/2
      Which is both O(n) AND Theta(n)
      (2 votes)
  • leafers sapling style avatar for user Ben  Sell
    My algorithms class is solely in Python, with the professor explicitly stating that Java is not in the course. In case someone needs some hands-on practice with codes like that or C#, is there any way that some programming languages aside from Java and JavaScript can be referenced and demonstrated in this series of Algorithm lessons?
    (1 vote)
    Default Khan Academy avatar avatar for user