
Apna College
C++ DSA
C++ DSA
2 Chapters
593 Lectures
73 Notes & Sheets
Course Syllabus & Chapters (2)
1Lectures593 lessons
How to verify on Discord?
video#1
Orientation Session (Recording)
video#2
Extra Live Session 1 (Recording)
video#3
Extra Live Session 2 (Recording)
video#4
Extra Live Session 3 (Recording)
video#5
Linkedin Mentorship Session (with Aman Sir)
video#6
Coding Platforms Mentorship Session
video#7
Projects Mentorship Session
video#8
Resume Building Mentorship Session
video#9
Aman Sir's session for 1st year
video#10
Off-Campus Mentorship Session
video#11
Special Mentorship Session by Aman Sir
video#12
Placement & Internships Season 2025-26
video#13
Message from the Teacher
video#14
Placements & Internships
video#15
About the Lectures
video#16
Pre-requisites
video#17
What to Install?
video#18
Using Replit
video#19
For Mac Users - Setting up C++
video#20
Using VS Code
video#21
What are Flowcharts?
video#22
Components of Flowchart
video#23
Sum of 2 Numbers
video#24
Calculate Simple Interest
video#25
Max of 2 Numbers
video#26
Print N Natural Numbers
video#27
Sum of N Natural Numbers
video#28
Boilerplate Code in C++
video#29
How does code run?
video#30
Preprocessor Directive
video#31
Main Function in C++
video#32
What is Namespace?
video#33
Output in C++
video#34
Print the Pattern
video#35
Variables in C++
video#36
Naming Conventions
video#37
Identify Valid Names
video#38
Data Types in C++
video#39
Comments
video#40
Input in C++
video#41
Print Average Marks
video#42
Constants
video#43
Implicit Type Conversion
video#44
Explicit Typecasting
video#45
Practice Qs
video#46
Arithmetic Operators
video#47
Unary Arithmetic Operators
video#48
Assignment Operators
video#49
Relational Operators
video#50
Logical Operators
video#51
If else Statements
video#52
Practice Qs
video#53
Else if Statements
video#54
Practice Qs
video#55
Practice Qs
video#56
Ternary Operator
video#57
Switch Statement
video#58
Build a Calculator
video#59
for Loop (in Detail)
video#60
Print "apna college"
video#61
Print N Natural Numbers
video#62
Sum of N Natural Numbers
video#63
while Loop
video#64
Practice Qs
video#65
Practice Qs
video#66
do while Loop
video#67
break Statement
video#68
Practice Qs (break)
video#69
continue Statement
video#70
Practice Qs (continue)
video#71
Check for Prime
video#72
Check for Prime (Optimized)
video#73
Nested Loops
video#74
Nested Loops (Dry Run)
video#75
Star Pattern
video#76
Inverted Star Pattern
video#77
Half Pyramid Pattern
video#78
Character Pyramid Pattern
video#79
Hollow Rectangle Pattern
video#80
Inverted & Rotated Half-Pyramid Pattern
video#81
Floyd's Triangle Pattern
video#82
Diamond Pattern
video#83
Butterfly Pattern
video#84
What are Functions?
video#85
Forward Declaration
video#86
Syntax with Parameters
video#87
Practice Qs
video#88
Practice Qs (Factorial)
video#89
Function call in Memory
video#90
Scope (Local & Global)
video#91
Practice Qs (Prime Number)
video#92
Practice Qs (Binomial Coefficient)
video#93
Function Overloading
video#94
Practice Qs (Primes in Range)
video#95
What is Binary Number System?
video#96
Convert Binary to Decimal
video#97
Convert Decimal to Binary
video#98
Question (Decimal to Binary)
video#99
Common Numbers in Binary
video#100
Data Type Modifiers
video#101
Binary to Decimal (Code)
video#102
Decimal to Binary (Code)
video#103
Basic Concepts of Memory
video#104
AddressOf (&) Operator
video#105
What are Pointers?
video#106
Dereference Operator
video#107
Null Pointers
video#108
Passing Arguments (Value vs Reference)
video#109
Reference Variables
video#110
Practice Qs
video#111
Practice Qs
video#112
Basics of Array
video#113
Creating an Array
video#114
Output & Input Array
video#115
Find Largest in Array
video#116
Arrays are passed by Reference
video#117
Linear Search
video#118
Reverse an Array
video#119
Binary Search
video#120
Binary Search Code
video#121
Binary Search (Time Complexity)
video#122
Array Pointer
video#123
Pointer Arithmetic 1
video#124
Pointer Arithmetic 2
video#125
Pointer Arithmetic 3
video#126
Pointer Arithmetic 4
video#127
Print Subarrays
video#128
Max Sum Subarray (Brute Force)
video#129
Max Sum Subarray (Slightly Optimized)
video#130
Kadane's Algorithm for Max Sum Subarray
video#131
Buy & Sell Stocks
video#132
Buy & Sell Stocks (Code)
video#133
Trapping Rainwater
video#134
Trapping Rainwater (Code)
video#135
Bubble Sort
video#136
Bubble Sort (Code)
video#137
Selection Sort
video#138
Selection Sort (Code)
video#139
Insertion Sort
video#140
Insertion Sort (Code)
video#141
Counting Sort
video#142
Counting Sort (Code)
video#143
In-built Sort in C++
video#144
Practice Qs
video#145
Introduction to 2D Arrays
video#146
Input & Output a 2D Array
video#147
2D Arrays in Memory
video#148
Spiral Matrix
video#149
Spiral Matrix (Code)
video#150
Diagonal Sum
video#151
Diagonal Sum (Code)
video#152
Search in Sorted Matrix
video#153
Search in Sorted Matrix (Code)
video#154
Matrix Pointers
video#155
Matrix Pointers in Functions
video#156
Revisit Char Data Type
video#157
Character Array
video#158
Input Char Array
video#159
Convert to UpperCase
video#160
Reverse a Char Array
video#161
Valid Palindrome
video#162
cstring Functions
video#163
OOPs Intro (for Strings)
video#164
C++ Strings
video#165
for each Loop
video#166
String Member Functions
video#167
Valid Anagram
video#168
Valid Anagram (Code)
video#169
Creating a Dynamic Array
video#170
Dynamic Memory Allocation
video#171
Static v/s Dynamic Allocation
video#172
Memory Leak
video#173
2D Dynamic Arrays
video#174
What is STL?
video#175
Vector Introduction
video#176
Vector Implementation in Memory
video#177
Pair Sum
video#178
2D Vectors
video#179
Practice Qs
video#180
Bitwise Operators
video#181
One's Complement
video#182
Bitwise Shift Operators
video#183
Practice Qs
video#184
Check if Odd or Even
video#185
Get ith Bit
video#186
Set ith Bit
video#187
Clear ith Bit
video#188
Check for Power of 2
video#189
Update ith Bit
video#190
Clear Last i Bits
video#191
Count Set Bits
video#192
Fast Exponentiation
video#193
Fast Exponentiation (Code)
video#194
Classes & Objects
video#195
Access Modifiers
video#196
Getters & Setters
video#197
Encapsulation
video#198
Constructor
video#199
Practice Qs
video#200
Copy Constructor
video#201
Shallow & Deep Copy
video#202
Destructor
video#203
Inheritance
video#204
Mode of Inheritance
video#205
Single Inheritance
video#206
Multi-level Inheritance
video#207
Multiple Inheritance
video#208
Hierarchical & Hybrid Inheritance
video#209
Polymorphism
video#210
Function Overloading
video#211
Operator Overloading
video#212
Function Overriding
video#213
Virtual Functions
video#214
Abstraction
video#215
Pure Virtual Function
video#216
Static Keyword
video#217
Static Objects
video#218
Friend Functions & Class
video#219
Practice Qs
video#220
Practice Qs
video#221
What is Recursion?
video#222
Dive Deep into Recursion
video#223
Recursion in Memory
video#224
Numbers in Decreasing Order
video#225
Dry Run with Call Stack
video#226
Stack Overflow
video#227
Sum of N Natural Numbers
video#228
Nth Fibonacci
video#229
Nth Fibonacci (Code)
video#230
Check if Array Sorted
video#231
First Occurrence
video#232
Last Occurrence
video#233
Print X to the power N
video#234
X to the power N (Code)
video#235
Tiling Problem
video#236
Tiling Problem (Code)
video#237
Remove Duplicates in String
video#238
Remove Duplicates (Code)
video#239
Friends Pairing Problem
video#240
Friends Pairing (Code)
video#241
Binary Strings Problem
video#242
Binary Strings (Code)
video#243
Binary Strings (Dry Run)
video#244
Merge Sort Algorithm
video#245
Merge / Combine Step
video#246
Merge Sort (Code)
video#247
Merge Sort (Summary)
video#248
Quick Sort Algorithm
video#249
Quick Sort (Code)
video#250
Worst Case Time Complexity - Quick Sort
video#251
Search in Rotated Sorted Array
video#252
Rotated Sorted (Pseudocode)
video#253
Rotated Sorted (Code)
video#254
Introduction
video#255
What is Time Complexity?
video#256
Constant Time Complexity
video#257
Big O Notation
video#258
Big O from Functions
video#259
Big O Math Formula (Optional)
video#260
Other Notations
video#261
What is Space Complexity?
video#262
Common Time Complexities
video#263
Constant & Linear TC
video#264
Quadratic TC
video#265
Practice Qs 1
video#266
Practice Qs 2
video#267
Practice Qs 3
video#268
Bubble Sort Analysis
video#269
Logarithmic TC (Binary Search Analysis)
video#270
O(n) vs O(logn) - Linear vs Log
video#271
Recursion Time Complexity
video#272
Recursive Sum of N Numbers
video#273
Recursive Factorial of N
video#274
Recursive Nth Fibonacci
video#275
Merge Sort Analysis
video#276
Power Function Analysis
video#277
Practice Qs
video#278
How to approach Coding Qs?
video#279
Introduction
video#280
Backtracking on Arrays
video#281
Find Subsets
video#282
Find Subsets (Code)
video#283
Find Permutations
video#284
Find Permutations (Code)
video#285
N Queens Qs Discussion
video#286
N Queens (Approach)
video#287
isSafe in N Queens (Approach)
video#288
N Queens (Time Complexity)
video#289
N Queens Variations
video#290
Grid Ways
video#291
Grid Ways (Code)
video#292
Grid Ways (Dry Run)
video#293
Grid Ways (Time Complexity)
video#294
Grid Ways (Optimization)
video#295
Sudoku Solver
video#296
Sudoku Solver (Code)
video#297
isSafe in Sudoku Solver
video#298
Introduction to Linked List
video#299
LL Implementation
video#300
Push Front in LL
video#301
Push Back in LL
video#302
Print LL
video#303
Insert in Middle of a LL
video#304
Deleting the Linked List
video#305
Pop Front in LL
video#306
Pop Back in LL
video#307
Iterative Search in LL
video#308
Recursive Search in LL
video#309
Reverse a Linked List
video#310
Find & Remove Nth Node from End
video#311
Find & Remove Nth (Code)
video#312
Detect Cycle in a LL
video#313
Detect a Cycle (Code)
video#314
Removing Cycle in LL
video#315
Removing Cycle (Code)
video#316
Removing Cycle (Math Proof)
video#317
List in STL
video#318
Merge Sort on a LL
video#319
Merge Sort (Split At Mid)
video#320
Merging 2 Sorted Lists
video#321
Zig Zag Linked List
video#322
Zig Zag LL (Alternate Merging)
video#323
Doubly Linked List (Push Front)
video#324
Doubly Linked List (Pop Front)
video#325
Introduction to Stack
video#326
Stack using Vector
video#327
Stack using Vector & Class Template
video#328
Stack using LinkedList
video#329
Stack in STL
video#330
Push at Bottom of Stack
video#331
Push at Bottom (Code)
video#332
Reverse a String using Stack
video#333
Reverse a Stack
video#334
Stock Span
video#335
Stock Span (Approach)
video#336
Stock Span (Code)
video#337
Next Greater Element
video#338
Next Greater Element (Code)
video#339
Valid Parentheses
video#340
Valid Parentheses (Code)
video#341
Duplicate Parentheses
video#342
Duplicate Parentheses (Code)
video#343
Max Area in Histogram
video#344
Max Area in Histogram (nextSmaller Logic)
video#345
Max Area in Histogram (Code)
video#346
Queue Introduction
video#347
Implementation using LinkedList
video#348
Circular Queue using Array
video#349
Queue in STL
video#350
Queue using 2 Stacks
video#351
Stack using 2 Queues
video#352
First non-repeating letter
video#353
First non-repeating letter (Code)
video#354
Interleave 2 Queues
video#355
Interleave 2 Queues (Code)
video#356
Queue Reversal
video#357
Double Ended Queue
video#358
Queue using Deque
video#359
Stack using Deque
video#360
Greedy Approach Introduction
video#361
Activity Selection Problem
video#362
Activity Selection (Approach)
video#363
Activity Selection (Code)
video#364
Activity Selection (Proof)
video#365
Pairs in C++
video#366
Fractional Knapsack
video#367
Fractional Knapsack (Code)
video#368
Min Absolute Difference of Pairs
video#369
Max Chain Length
video#370
Max Chain Length (Code)
video#371
Indian Coins
video#372
Indian Coins (Code)
video#373
Job Sequencing Problem
video#374
Job Sequencing Variation
video#375
Binary Trees Introduction
video#376
Levels & Subtrees
video#377
Practice Quiz
video#378
Build Tree from Preorder
video#379
Preorder Traversal
video#380
Inorder Traversal
video#381
Postorder Traversal
video#382
Level Order Traversal
video#383
Height of Binary Tree
video#384
Height of BT (Code)
video#385
Count of Nodes in BT
video#386
Sum of Nodes in BT
video#387
Diameter of a Tree ( Approach 1 )
video#388
Diameter of a Tree ( Code )
video#389
Diameter of a Tree ( Approach 2 )
video#390
Diameter of a Tree ( Code 2 )
video#391
Subtree of another Tree
video#392
Subtree of another Tree (isIdentical)
video#393
Map in C++
video#394
Top View of a Tree (Horizontal Distance)
video#395
Top View of a Tree ( Approach )
video#396
Top View of a Tree ( Code )
video#397
Kth Level of a Tree
video#398
Lowest Common Ancestor
video#399
Lowest Common Ancestor (Code)
video#400
LCA (Approach 2)
video#401
LCA (Approach 2) Code
video#402
Min Distance between Nodes
video#403
Kth Ancestor of a Node
video#404
Kth Ancestor (Code)
video#405
Transform to Sum Tree
video#406
BST Introduction
video#407
Search in BST
video#408
Insert & Build a BST
video#409
Search in BST (Code)
video#410
Delete a Node in BST
video#411
Inorder Successor
video#412
Delete a Node (Code)
video#413
Print in Range
video#414
Root to Leaf Path
video#415
Validate BST
video#416
Validate BST (Code)
video#417
Sorted Array to Balanced BST
video#418
Sorted Array to Balanced BST (Code)
video#419
BST to Balanced BST
video#420
BST to Balanced BST (Code)
video#421
Largest BST in BT
video#422
Largest BST in BT (Code)
video#423
Merge 2 BSTs
video#424
Heaps & Priority Queue (Introduction)
video#425
PQ in C++ STL
video#426
What are Heaps?
video#427
Building Heaps
video#428
Push in Heap
video#429
Push in Heap (Code)
video#430
Pop in Heap
video#431
Pop in Heap (Code)
video#432
Pop in Heap (Dry Run)
video#433
PQ for Objects
video#434
PQ for Pairs
video#435
Heap Sort (Building maxHeap)
video#436
Heap Sort (Sorting)
video#437
Nearby Cars
video#438
Nearby Cars (Code)
video#439
Connect N Ropes
video#440
Connect N Ropes (Code)
video#441
Weakest Soldier
video#442
Weakest Soldier (Code)
video#443
Sliding Window Maximum
video#444
Sliding Window Maximum (Code)
video#445
Introduction
video#446
Hash Table Data Structure
video#447
Hashing (Hash Function)
video#448
Collisions
video#449
Building Hash Table
video#450
Insert in Hash Table
video#451
Rehashing
video#452
Search in Hash Table
video#453
STL Containers
video#454
Unordered Maps
video#455
Maps
video#456
Unordered Sets
video#457
Sets
video#458
Majority Element
video#459
Majority Element (Code)
video#460
Valid Anagram
video#461
Valid Anagram (Code)
video#462
Count Distinct
video#463
Union & Intersection
video#464
Itinerary from Tickets
video#465
Itinerary from Tickets (Code)
video#466
Zero Sum Largest Subarray
video#467
Zero Sum Largest Subarray (Code)
video#468
K Sum Subarray Count
video#469
K Sum Subarray Count (Code)
video#470
Tries Introduction
video#471
Search in Trie
video#472
Building a Trie DS
video#473
Insert in Trie
video#474
Search in Trie
video#475
Word Break Problem
video#476
Word Break (Code)
video#477
Prefix Problem
video#478
Prefix (Code)
video#479
StartsWith Problem
video#480
Count Unique Substrings
video#481
Count Unique Substrings (Code)
video#482
Longest Word with all Prefix
video#483
Longest Word (Code)
video#484
Introduction to Graphs
video#485
Types of Graphs
video#486
Graph using Adjacency List
video#487
Graph using Adjacency Matrix
video#488
Edge List & Implicit Graph
video#489
Building a Graph (Adjacency List)
video#490
Breadth First Traversal (BFS)
video#491
BFS Code
video#492
Depth First Traversal (DFS)
video#493
DFS Code
video#494
Has Path Problem
video#495
Disconnected Components
video#496
Cycle in Graphs
video#497
Cycle Detection (Undirected)
video#498
Cycle Detection Code (Undirected)
video#499
Undirected approach for Directed
video#500
Cycle Detection (Directed)
video#501
Cycle Detection Code (Directed)
video#502
Cycle Detection Dry Run (Directed)
video#503
Bipartite Graph
video#504
Bipartite Graph (Code)
video#505
Bipartite Graph (Approach 2)
video#506
All Paths Problem
video#507
What is Topological Sorting?
video#508
Topological Sorting (DFS)
video#509
Topological Sorting Code (DFS)
video#510
Course Schedule I
video#511
Course Schedule II
video#512
Kahn's Algorithm (Indegree)
video#513
Topoplogical Sorting (Kahn's Algorithm)
video#514
Kahn's Algorithm Code
video#515
Kahn's Algo for Cycle Detection
video#516
Dijkstra's Algorithm (Edge Relaxation)
video#517
Dijkstra's Algorithm (Approach)
video#518
Dijkstra's Algorithm (Code)
video#519
BellmanFord Algorithm (Approach)
video#520
BellmanFord Algorithm (Code)
video#521
What is MST?
video#522
Prim's Algorithm
video#523
Prim's Algorithm (Code)
video#524
Min Cost to Connect Points
video#525
Cheapest Flights within K Stops
video#526
Cheapest Flights (Code)
video#527
Disjoint Set (Union Find)
video#528
Disjoint Set (Code)
video#529
Kruskal's Algorithm
video#530
Kruskal's Algorithm (Code)
video#531
Flood Fill Algorithm
video#532
Flood Fill (Code)
video#533
DP Introduction
video#534
DP using Fibonacci Concept
video#535
What is DP?
video#536
Fibonacci using Tabulation
video#537
Types of DP
video#538
Important DP Concepts
video#539
Climbing Stairs (Recursion)
video#540
Climbing Stairs (Memoization)
video#541
Climbing Stairs (Tabulation)
video#542
Variation of Climbing Stairs
video#543
Knapsack Problems
video#544
0-1 Knapsack
video#545
0-1 Knapsack (Recursion Code)
video#546
0-1 Knapsack (Memoization)
video#547
0-1 Knapsack (Tabulation)
video#548
Target Sum Subset
video#549
Unbounded Knapsack
video#550
Coin Change Problem
video#551
Coin Change (Code)
video#552
Rod Cutting Problem
video#553
Rod Cutting (Code)
video#554
Longest Common Subsequence
video#555
LCS (Memoization)
video#556
LCS (Tabulation)
video#557
Longest Common Substring
video#558
Longest Common Substring (Code)
video#559
Longest Increasing Subsequence
video#560
Longest Increasing Subsequence (Code)
video#561
Edit Distance
video#562
Edit Distance (Code)
video#563
WildCard Matching
video#564
WildCard Matching (Bottom Up)
video#565
Catalan's Number
video#566
Nth Catalan (Recursion)
video#567
Nth Catalan (Memoization)
video#568
Nth Catalan (Tabulation)
video#569
Count BSTs from Nodes
video#570
Mountain Ranges
video#571
Matrix Concepts (Basic Math)
video#572
Matrix Chain Multiplication
video#573
MCM (with Recursion)
video#574
MCM Code (Recursion)
video#575
MCM (Memoization)
video#576
MCM (Tabulation)
video#577
MCM Code (Tabulation)
video#578
Minimum Partitioning
video#579
Minimum Partitioning (Code)
video#580
Segment Trees Introduction
video#581
Meaning & Count of Nodes
video#582
Creating Segment Tree
video#583
Creating Segment Tree (Approach)
video#584
Creating Segment Tree (Code)
video#585
Queries on Segment Tree
video#586
Queries on Segment Tree (Code)
video#587
Update on Segment Tree
video#588
Update on Segment Tree (Code)
video#589
Range Max ST (Creation)
video#590
Range Max ST (Query)
video#591
Range Max ST (Update)
video#592
Range Min (Approach)
video#593
2Notes73 lessons
Assignment Questions
pdf#1
Catalan's Variations & Applications
pdf#2
Aptitude Preparation Sheet
pdf#3
Assignment Questions
pdf#4
Assignment Questions
pdf#5
Assignment Questions
pdf#6
Assignment Questions
pdf#7
Self Practice Activity
pdf#8
Assignment Solutions
pdf#9
Assignment Questions
pdf#10
Assignment Questions
pdf#11
Assignment Solutions
pdf#12
Assignment Solutions
pdf#13
Assignment Solutions
pdf#14
Assignment Solutions
pdf#15
Assignment Questions
pdf#16
Assignment Questions
pdf#17
MCQ Test Link
pdf#18
Assignment Questions
pdf#19
Assignment Solutions
pdf#20
Extra Practice Qs (Free)
pdf#21
Assignment Questions
pdf#22
Self Practice Qs
pdf#23
Computer Networking Notes
pdf#24
Operating System Notes
pdf#25
DBMS Notes
pdf#26
Assignment Questions
pdf#27
Assignment Solutions
pdf#28
Master's Theorem (Reading Material)
pdf#29
Assignment Solutions
pdf#30
Assignment Questions
pdf#31
Assignment Solutions
pdf#32
Understanding Log (Reading Material)
pdf#33
Assignment Questions
pdf#34
Assignment Solutions
pdf#35
Assignment Questions
pdf#36
Helpful Project Tutorials (Free)
pdf#37
Assignment Solutions
pdf#38
Assignment Questions
pdf#39
Assignment Solutions
pdf#40
Assignment Questions
pdf#41
Assignment Questions
pdf#42
Assignment Solutions
pdf#43
Assignment Solutions
pdf#44
Assignment Questions
pdf#45
Assignment Solutions
pdf#46
Assignment Questions
pdf#47
Assignment Activity
pdf#48
Assignment Solutions
pdf#49
Assignment Questions
pdf#50
Time & Space Complexity (Reading Material)
pdf#51
Assignment Solutions
pdf#52
Assignment Questions
pdf#53
Assignment Solutions
pdf#54
Assignment Questions
pdf#55
Assignment Solutions
pdf#56
Assignment Questions
pdf#57
Assignment Solutions
pdf#58
Assignment Questions
pdf#59
Class Slides
pdf#60
Assignment Solutions
pdf#61
Assignment Questions
pdf#62
Assignment Solutions
pdf#63
Assignment Questions
pdf#64
Assignment Solutions
pdf#65
Assignment Questions
pdf#66
Assignment Solutions
pdf#67
Assignment Questions
pdf#68
Mandatory to Join Link
pdf#69
Assignment Solutions
pdf#70
Assignment Questions
pdf#71
Installation Guide
pdf#72
Fill Your Details
pdf#73