Serving schools, colleges & students across India Sign inRegister freeFAQsHelpcontact@ghosla.io
GHOSLAGrowth Hub for Opportunities, Skills, Learning & AchievementGrow•Learn•Achieve Login Get Started

C++ for DSA & Competitive Programming

Master C++ STL, complexity, binary search, DP and graphs for coding rounds and online contests

Ghosla Academy · Coding Team

C++ is the most common language in competitive programming and a popular choice for coding rounds in campus placements, thanks to its speed and the Standard Template Library. This course teaches the C++ you actually need to solve problems: fast input and output, choosing the right data types, and the STL containers and algorithms that save you from writing everything by hand. You then learn to read constraints and estimate time complexity, and practise the core techniques that appear again and again: prefix sums, two pointers, binary search on the answer, recursion and backtracking, dynamic programming, and graph algorithms such as BFS, DFS and Dijkstra. Every snippet compiles with g++ and comes with a worked example. Two projects build the habits that matter most: writing down your approach and upsolving after every contest. No ratings or selections are promised; steady, honest practice is what this course helps you build.

What you will be able to do

  • Write fast, correct C++ with proper I/O and overflow-safe data types
  • Use STL containers and algorithms such as vector, map, set, priority_queue and sort confidently
  • Estimate time complexity and pick an approach that fits the constraints
  • Apply prefix sums, two pointers and binary search, including binary search on the answer
  • Solve recursion, backtracking and classic dynamic programming problems
  • Implement BFS, DFS and Dijkstra and follow a sound contest and upsolving routine

What you build

  • 10-problem practice sheet with written approaches and complexity
  • Virtual contest with a structured upsolving log

What you need to start

  • Basic programming in any language: variables, loops, conditions and functions
  • A laptop with g++ (free) or a browser-based online C++ compiler

Curriculum · 5 sections, 23 lectures

C++ setup for problem solving4 lectures
  1. Why C++ for DSA and competitive programmingFree preview10 min
  2. Setting up g++ and VS Code, or an online compilerFree preview12 min
  3. Fast input/output, data types and overflow14 min
  4. Quiz: C++ setup and basics6 min
The Standard Template Library5 lectures
  1. vector, pair and sort with custom comparators15 min
  2. set, map, unordered_map and when to use which15 min
  3. stack, queue, deque and priority_queue14 min
  4. STL cheat sheet for contests9 min
  5. Quiz: STL6 min
Complexity and core techniques5 lectures
  1. Time complexity and the 10^8 operations rule13 min
  2. Prefix sums and two pointers15 min
  3. Binary search, including binary search on the answer15 min
  4. Project: Solve and document a 10-problem practice sheet20 min
  5. Quiz: complexity and techniques6 min
Recursion and dynamic programming4 lectures
  1. Recursion and backtracking15 min
  2. Dynamic programming: from memoisation to tabulation16 min
  3. Classic DP patterns: knapsack, LIS and LCS10 min
  4. Quiz: recursion and DP6 min
Graphs and contest strategy5 lectures
  1. Graphs: adjacency lists, BFS and DFS16 min
  2. Shortest paths with Dijkstra's algorithm14 min
  3. Contest strategy: platforms, practice and upsolving11 min
  4. Project: Virtual contest and upsolving log20 min
  5. Quiz: graphs and contests6 min

Who this is for

  • Engineering and BCA/MCA students preparing for campus coding rounds
  • Beginners on Codeforces, CodeChef or LeetCode who want to move up steadily
  • Programmers who know C or Java and want to switch to C++ for problem solving