FREE C++ COURSE
Free C++ Course: Zero to Interview-Ready
Learn C++ from your first line of code to the patterns coding interviews ask about. Every lesson is interactive: write the code in your browser and check each step as you go. Try the first step of any lesson free, no sign-up needed.
PART 1
Learn to code
Coding fundamentals, from your first line of code to solving problems on your own: loops, lists, strings, functions and the basics of classes.
Welcome To C++
Variables
Calculations With Numbers
Functions I
- Functions
- Defining Functions: Buggy Code
- Defining Functions: Quiz
- Calling Functions: Buggy Code
- Calling Functions: Quiz
- Execution Flow: Quiz
- Why Functions
- Exercise: Create a Function
- Function Parameters & Arguments
- Parameters & Arguments: Buggy Code I
- Parameters & Arguments: Buggy Code II
- Why Parameters & Arguments
- Exercise: Create Function With Parameters
- Returning From Functions
- Returning From Functions: Quiz I
- Returning From Functions: Buggy Code I
- Returning From Functions: Quiz II
- Returning From Functions: Buggy Code II
- Returning From Functions: Quiz III
- Returning From Functions: Buggy Code III
- Returning From Functions: Quiz IV
- Returning From Functions: Buggy Code IV
Calculations - Challenges
Strings I
Strings - Challenges
Conditional Statements
Conditional Statements - Challenges
Arrays I
Arrays - Challenges
Dictionaries
Dictionaries - Challenges
For Loops - Looping Over Arrays
While Loops & For Loops
Loops & Conditionals
Loops & Global Variables
Looping Over Array Indices
Projects: Everyday Programs
- Shopping Cart 1: Single Item Total
- Shopping Cart 2: Tax and Discount
- Shopping Cart 3: Free Shipping
- Shopping Cart 4: Cart Sum
- Shopping Cart 5: Coupon Codes
- Shopping Cart 6: Group by Category
- Password Strength 1: Length Check
- Password Strength 2: Has a Digit
- Password Strength 3: Character Classes
- Password Strength 4: Count Character Classes
- Password Strength 5: Common Passwords
- Password Strength 6: Score from 0 to 100
- Report Card 1: One Subject Average
- Report Card 2: Weighted Score
- Report Card 3: Letter Grade
- Report Card 4: Multiple Students
- Report Card 5: Grades by Subject
- Report Card 6: Class Statistics
Loops - Challenges
While Loops - Challenges
Loops With Strings, Arrays & Dictionaries
Helper Functions
Nested Loops
Nested Loops Over Grids
Strings
PART 2
Coding interviews
Big O, then the patterns behind the questions top tech companies ask, from brute force to dynamic programming.
Free Coding Interview Questions
Big O Notation
Brute Force
Sorting
Partial Sums #1
Partial Sums #2
Two Pointers
Hash Table
- Hash Map
- Collection of Numbers
- Ransom Note
- Two Sum IV
- Hash Set
- Distinct Values II
- Remove Duplicates From Array III
- Find Duplicates
- Valid Sudoku
- Longest Subarray Without Reapeating II
- Longest Subarray with at most K Distinct Integers
- Longest Consecutive Sequence II
- Group Anagrams II
- Encode and Decode Strings
- Find The Difference II
- Intersection of Two Arrays
- Top K Frequent Elements
- LRU Cache
- Design Underground System
Binary Search
Divide And Conquer
Backtracking
Linked Lists
- Linked Lists
- Reverse Linked List
- Remove Linked List Elements
- Remove Nth Node From End Of List
- Remove Duplicates From Sorted Linked List
- Linked List Cycle
- Palindrome Linked List
- Intersection Of Two Linked Lists
- Add Two Numbers
- Flatten Multilevel List
- Flatten Multilevel List II
- Copy List Random Pointer
- Copy List Random Pointer II
- Merge Two Sorted Lists
- Reorder List
- Merge K Sorted Lists
- Merge K Sorted Lists II
Sliding Window
Heap
Stack
Binary Trees
- Post Order Tree Traversal
- Zigzag Tree Traversal
- Symmetric Tree
- Lca In Bst
- Binary Tree Diameter
- Binary Tree Maximum Path Sum
- Kth Smallest Element In Bst
- Validate Binary Search Tree
- Count Good Nodes in Binary Tree
- Max Sum Bst
- Max Sum Bst II
- Post Order Tree Traversal II
- Maximum Depth of Binary Tree
- Balanced Binary Tree
- Invert Binary Tree
- Same Tree
- Subtree of Another Tree
- Recover Tree From Preorder
- Construct Binary Tree from Preorder and Inorder Traversal
- Serialize and Deserialize Binary Tree
- Zigzag Tree Traversal II
- Inorder Tree Traversal
- Level Order Traversal
- Binary Tree Right Side View
- Flatten Binary Tree
- Encoded Tree Sums
- Convert Sorted Array to Binary Search Tree
Dynamic Programming
- Binary Strings Of Given Length
- Permutations Of Given Length
- Valley Permutations
- Binary Strings Without Consecutive Ones
- Binary Strings With K Ones
- Binary Strings With K Ones On Even Positions
- Binary Strings With At Most K Consecutive Ones
- Permutations With K Inversions
- Digit Product Numbers
- Swap Permutations
- Best Time To Buy Stock
- Best Time To Buy Stock II
- Trapping Rain Water
- Unique Paths
- Climbing Stairs
- Min Cost Climbing Stairs
- House Robber
- House Robber II
- Decode Ways
- Maximum Product Subarray
- Coin Change
- Coin Change II
- Partition Equal Subset Sum
- Word Break
- Longest Common Subsequence
- Edit Distance
- Longest Increasing Subsequence
- Longest Palindromic Substring
Greedy
Intervals
Graphs
- Depth First Search (DFS): Find if Path Exists in Graph
- BFS Min Distance to Every Vertex
- Number Of Islands
- Size Of Islands
- Number of Connected Components in an Undirected Graph
- Graph Valid Tree
- Redundant Connection
- 01 Matrix
- Rotting Oranges
- Shortest Path with Alternating Colors
- Course Schedule
- Course Schedule II
- Alien Dictionary
- Clone Graph
- Pacific Atlantic Water Flow
- Surrounded Regions
- Dijkstra's Algorithm
- Min Cost to Connect All Points
- Word Ladder
- Word Ladder II
- Word Ladder III
- Word Ladder IV
- Jump Game IV
PART 3
Build programs
Your own command-line tools, then object-oriented programming: inheritance, polymorphism and interfaces, with projects to build.
Projects: Command-Line Tools
- cat 1: Print Lines
- cat 2: Number Lines (-n)
- cat 3: Show Special Characters (-A)
- cat 4: Join Several Files
- head 1: First 10 Lines
- head 2: First n Lines
- head 3: When n Is Too Big
- head 4: Negative n
- wc 1: Count Lines
- wc 2: Count Words (-w)
- wc 3: Count Characters (-c)
- wc 4: Choose What to Count
- grep 1: Lines That Match
- grep 2: Ignore Case (-i)
- grep 3: Lines That Don't Match (-v)
- grep 4: Whole Words (-w)
- uniq 1: Drop Repeated Lines
- uniq 2: Count Repeats (-c)
- uniq 3: Only Repeated Lines (-d)
- uniq 4: Only Unique Lines (-u)
- sort 1: Alphabetical Order
- sort 2: Reverse Order (-r)
- sort 3: Numeric Order (-n)
- sort 4: Sort by Column (-k)
- tr 1: Swap One Character
- tr 2: Translate a Set
- tr 3: Delete Characters (-d)
- tr 4: Squeeze Repeats (-s)