๐Ÿง 

Algorithms

An algorithm is a precise recipe for solving a problem. Learn the classic ones โ€” and, more importantly, how to invent your own.

Same problem, very different amounts of work

If the number of items doubles, how much more work does your algorithm do? That one question is the heart of algorithm design.

O(1)instant
O(log n)tiny
O(n)fair
O(n log n)okay
O(nยฒ)slow!
binary-search.pseudo
1BEGIN2    SET LIST = [2, 5, 8, 12, 16, 23, 38]3    SET TARGET = 234    SET LOW = 05    SET HIGH = LENGTH(LIST) - 16    WHILE LOW <= HIGH7        SET MID = (LOW + HIGH) DIV 28        IF LIST[MID] = TARGET THEN9            DISPLAY "Found at", MID10            BREAK11        ELSE IF LIST[MID] < TARGET THEN12            SET LOW = MID + 113        ELSE14            SET HIGH = MID - 115        END IF16    END WHILE17END

๐Ÿ“บ Algorithm lessons (Phase 07)

01 What Is an Algorithm? ๐Ÿšง Coming soon
02 Linear Search ๐Ÿšง Coming soon
03 Binary Search ๐Ÿšง Coming soon
04 Counting ๐Ÿšง Coming soon
05 Frequency Counting ๐Ÿšง Coming soon
06 Minimum / Maximum ๐Ÿšง Coming soon
07 Running Totals ๐Ÿšง Coming soon
08 Prefix Totals ๐Ÿšง Coming soon
09 Two Pointers ๐Ÿšง Coming soon
10 Sliding Window ๐Ÿšง Coming soon
11 Sorting ๐Ÿšง Coming soon
12 Selection Sort ๐Ÿšง Coming soon
13 Bubble Sort ๐Ÿšง Coming soon
14 Insertion Sort ๐Ÿšง Coming soon
15 Divide and Conquer ๐Ÿšง Coming soon
16 Greedy Thinking ๐Ÿšง Coming soon
17 Recursion ๐Ÿšง Coming soon
18 Base Case ๐Ÿšง Coming soon
19 Recursive Case ๐Ÿšง Coming soon
20 Backtracking ๐Ÿšง Coming soon
21 Memoization ๐Ÿšง Coming soon
22 Dynamic Programming Intuition ๐Ÿšง Coming soon