Skip to content

About

This repository documents my journey of learning DSA in cpp . It contains fundamental cpp concepts , data structures and their implementations, algorithms with their complexities documented and DSA questions.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

Β 

History

627 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Data Structures & Algorithms in C++

This repository documents my journey of learning cpp and Data Structures and Algorihtms

🌟 Practice Resources

Beginner Level πŸ† Key Achievements

100+ C++ Programs implemented
Complete DSA Coverage from basics to advanced
Graph Algorithms including Articulation Points
Operating System Concepts with practical implementations
STL Mastery with real-world applications
Pattern Programming for logical skill development
Competitive Programming Solutions from LeetCode and CodeStudio
Dynamic Programming implementations with multiple approaches
Real Problem-Solving experience with popular coding platforms Start with Basic/ folder - Master C++ fundamentals 2. Practice patterns/ - Develop logical thinking 3. Learn OOPS/ concepts - Object-oriented programming

Intermediate Level

  1. Explore Arrays/ operations
  2. Master Search/ algorithms
  3. Understand Standard Template Library/
  4. Try problems in CODESTUDIO/Vector/ for practical application

Advanced Level

  1. Implement Tree/ data structures
  2. Study CPU scheduling/ algorithms
  3. Master Graph algorithms (Lecture 85, Lecture 99)
  4. Solve Dynamic Programming problems (CODESTUDIO/Dynamic Programming/, LeetCode/)
  5. Practice complex problems in Exam/ folder

Expert Level

  1. Explore competitive programming solutions in LeetCode/ and CODESTUDIO/
  2. Apply learned concepts to solve real-world problemsem solutions from:**

LeetCode: Sainava's Profile - Solutions available in LeetCode/ folder
CodeStudio/Coding Ninjas: Sainava's Profile - Solutions available in CODESTUDIO/ folder

Note: Missing lecture numbers correspond to practice sessions on these platforms. The actual solutions from these sessions are now included in the respective folders.U Scheduling Algorithms

  • First Come First Serve (FCFS)
  • Shortest Job First (SJF) - Preemptive & Non-Preemptive
  • Priority Scheduling - Preemptive & Non-Preemptive
  • Round Robin with Time Quantum
  • Round Robin Dispatcher

Deadlock Prevention

  • Banker's Algorithm Implementation
  • Resource Allocation & Safety Algorithms

πŸ’» Competitive Programming Solutions

CodeStudio/Coding Ninjas Problems (CODESTUDIO/)

  • Dynamic Programming:
    • Fibonacci Number Implementation
    • Ways to Reach Nth Stairs
  • Vector Operations:
    • Sort 0, 1, 2 (Dutch National Flag Problem)

LeetCode Problems (LeetCode/)

  • Problem #746: Min Cost Climbing Stairs
  • Dynamic Programming: Various DP solutions and approaches

These sections contain real problem solutions from popular coding platforms, demonstrating practical application of DSA concepts.es and Algorithms implementations in C++. It covers everything from basic C++ fundamentals to advanced graph algorithms, with lecture-wise organized content and practical implementations.


πŸ“‚ Repository Structure

Learning-DSA-in-CPP/
β”‚
β”œβ”€β”€ Basic/                      # C++ Fundamentals & Programming Basics
β”œβ”€β”€ OOPS/                       # Object-Oriented Programming Concepts
β”œβ”€β”€ patterns/                   # Pattern Programming (7 different patterns)
β”œβ”€β”€ Arrays/                     # Array Operations & Algorithms
β”œβ”€β”€ Search/                     # Searching Algorithms (Linear, Binary, etc.)
β”œβ”€β”€ Standard Template Library/  # STL Containers & Algorithms
β”œβ”€β”€ Tree/                       # Tree Data Structure Implementation
β”œβ”€β”€ CPU scheduling/             # Operating System Scheduling Algorithms
β”œβ”€β”€ Bankers_Algo/              # Banker's Algorithm for Deadlock Avoidance
β”œβ”€β”€ Exam/                      # Practice Problems & Exam Questions
β”‚
β”œβ”€β”€ CODESTUDIO/                # CodeStudio/Coding Ninjas Problems
β”‚   β”œβ”€β”€ Dynamic Programming/   # DP Problems (Fibonacci, Stairs)
β”‚   └── Vector/               # Vector-based Problems (Sort 0,1,2)
β”‚
β”œβ”€β”€ LeetCode/                  # LeetCode Problem Solutions
β”‚   β”œβ”€β”€ Dynamic Programming/   # DP Problems from LeetCode
β”‚  
β”‚
β”œβ”€β”€ Lecture 20-26/             # Foundation Lectures
β”œβ”€β”€ Lecture 33-36/             # Intermediate Concepts
β”œβ”€β”€ Lecture 44-48/             # Advanced Data Structures
β”œβ”€β”€ Lecture 54-62/             # Trees, Queues & Advanced Topics
β”œβ”€β”€ Lecture 69-99/             # Graphs, Heaps & Complex Algorithms
β”‚
└── README.md                  # This file

Topics Covered

πŸ—οΈ C++ Fundamentals (Basic/)

Data Types, Variables, and Operators
Loops and Conditional Statements
Functions (Pass by Value & Reference)
Bitwise Operations & Number Systems Prime Numbers & Mathematical Functions Fibonacci Series & Power Functions

Pattern Programming (patterns/)

7 Different Pattern Types Star Patterns, Number Patterns Pyramid and Diamond Patterns

Object-Oriented Programming (OOPS/)

Classes & Objects
4 Pillars of OOP Inheritance & Polymorphism
Encapsulation & Abstraction

Standard Template Library (STL/)

  • Containers: Vectors, Sets, Maps, Stacks, Queues
  • Algorithms: Sorting, Searching, STL Functions
  • Iterators & Custom Comparators

Searching Algorithms (Search/)

  • Linear Search Implementation
  • Binary Search & Variations
  • Square Root using Binary Search
  • Aggressive Cows Problem
  • Book Allocation Problem

Arrays (Arrays/)

  • Array Operations & Manipulations
  • Array Reversal & Rotation
  • Sum Calculations & Updates
  • Pivot Finding Algorithms

Trees (Tree/)

  • Tree Creation & Traversal
  • Binary Trees Implementation
  • Tree Algorithms & Operations

Advanced Topics (Lecture Series)

Lecture 60-62: Queue Implementation

  • Queue using STL
  • Queue using Linked Lists
  • Custom Queue Implementations

Lecture 75: Heap Data Structure

  • Heap Implementation
  • Priority Queue Operations
  • Heap Sort Algorithm

Lecture 85: Graph Algorithms

  • BFS (Breadth-First Search)
  • DFS (Depth-First Search)
  • Graph Representation & Traversal

Lecture 99: Advanced Graph Algorithms

  • Articulation Points Detection
  • Tarjan's Algorithm Implementation
  • Graph Theory Applications

Operating System Concepts

CPU Scheduling Algorithms

  • First Come First Serve (FCFS)
  • Shortest Job First (SJF) - Preemptive & Non-Preemptive
  • Priority Scheduling - Preemptive & Non-Preemptive
  • Round Robin with Time Quantum
  • Round Robin Dispatcher

Deadlock Prevention

  • Banker's Algorithm Implementation
  • Resource Allocation & Safety Algorithms

Practice Resources

For additional practice problems and coding challenges, check out:

LeetCode: Sainava's Profile
CodeStudio/Coding Ninjas: Sainava's Profile

Note: Missing lecture numbers correspond to practice sessions on these platforms.


πŸ›  Installation & Setup

Prerequisites

Make sure you have a C++ compiler installed:

  • GCC (Linux/MacOS)
  • Clang (MacOS/Linux)
  • MSVC (Windows)
  • MinGW (Windows)

Compilation

To compile any C++ file, use:

# Basic compilation
g++ filename.cpp -o output_name

# With debugging symbols
g++ -g filename.cpp -o output_name

# With C++11/14/17 standard
g++ -std=c++17 filename.cpp -o output_name

# Run the compiled program
./output_name

Running Examples

# Navigate to any lecture folder
cd "Lecture 99"

# Compile and run
g++ Articulation_points.cpp -o articulation
./articulation

Learning Path

Beginner Level

  1. Start with Basic/ folder - Master C++ fundamentals
  2. Practice patterns/ - Develop logical thinking
  3. Learn OOPS/ concepts - Object-oriented programming

Intermediate Level

  1. Explore Arrays/ operations
  2. Master Search/ algorithms
  3. Understand Standard Template Library/

Advanced Level

  1. Implement Tree/ data structures
  2. Study CPU scheduling/ algorithms
  3. Master Graph algorithms (Lecture 85, Lecture 99)
  4. Practice complex problems in Exam/ folder

πŸ† Key Achievements

100+ C++ Programs implemented
Complete DSA Coverage from basics to advanced
Graph Algorithms including Articulation Points
Operating System Concepts with practical implementations
STL Mastery with real-world applications
Pattern Programming for logical skill development


Contributing

Feel free to:

  • Suggest improvements
  • Add more algorithms or optimizations
  • Submit pull requests

Connect With Me

GitHub: @Sainava
Repository: Learning-DSA-in-CPP


If this repository helped you learn DSA, please give it a star!

About

This repository documents my journey of learning DSA in cpp . It contains fundamental cpp concepts , data structures and their implementations, algorithms with their complexities documented and DSA questions.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages