Skip to content

ershehzan/Data-Structure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,736 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧠 Data Structures & Algorithms in C++

A complete, well-organized collection of essential Data Structure and Algorithm implementations in C++ — perfect for learning, interview prep, and competitive programming.


📘 Overview

This repository provides clean and modular C++ implementations of fundamental:

📌 Data Structures

  • Arrays
  • Linked Lists
  • Stacks
  • Queues
  • Trees
  • Graphs
  • Heaps / Priority Queues
  • Vectors
  • Strings

📌 Algorithms

  • Sorting (Bubble, Merge, Quick, Selection, Insertion)
  • Searching (Linear, Binary)
  • Recursion
  • Greedy Algorithms
  • Backtracking
  • Graph Algorithms (BFS, DFS, etc.)
  • STL usage in C++

Ideal for: ✔ Students learning DSA ✔ Interview preparation ✔ Competitive programming ✔ Developers looking for reference implementations


📁 Folder Structure

├── .vscode/              # VS Code settings
├── Array/                # Array-based problems & implementations
├── BackTracking/         # Backtracking algorithms (subsets, sudoku, etc.)
├── Basic Codes/          # Core C++ basics & utility programs
├── Binary Search/        # Binary search problems & variations
├── Bubble Sort/
├── Experiments/          # Experimental or WIP code
├── Graph/                # Graph data structure + traversal algorithms
├── Greedy/               # Greedy algorithm implementations
├── Heap/                 # Min-heap, max-heap, priority queue
├── Inheritance/          # C++ OOP examples (inheritance)
├── Leet-Code/            # LeetCode-style problem solutions
├── Linear Search/
├── Linked-List/          # Singly/doubly linked list implementations
├── Merge Sort/
├── Pattern-printing/     # Pattern printing programs
├── Pointers/             # Pointer and memory examples
├── Polymorphism/         # OOP polymorphism examples
├── Queue/
├── Quick sort/
├── Recursion/
├── STL in C++/
├── Selection Sort/
├── Stack/
├── String/
├── Tree/                 # Binary trees, BST operations, traversals
├── Vector/
├── Z.Temporary/          # Temporary / work-in-progress files
└── insertion Sort/

✅ Features

  • 📚 Pure C++ — no external libraries required
  • 🧩 Beginner-friendly — clean code and clear structure
  • 🧠 Great for interview prep — includes fundamental logic & patterns
  • 🧪 Tested & modular — each DSA topic in its dedicated folder
  • 🚀 Easy to navigate — ideal as a personal DSA reference book

🚀 Getting Started

Prerequisites

  • C++ compiler (g++, clang++, or MSVC)
  • Basic knowledge of C++

Clone the repository

git clone https://github.com/ershehzan/Data-Structure.git
cd Data-Structure

Compile & run a file

g++ .\Array\your_file.cpp -o output
./output

🧩 How to Contribute

Contributions are welcome! Follow these simple steps:

  1. Fork this repository

  2. Create a branch

    git checkout -b feature/<your-feature-name>
    
  3. Add your code (with comments + correct folder placement)

  4. Ensure it compiles and runs correctly

  5. Submit a Pull Request with a clear description


📚 Why This Project?

Data Structures and Algorithms are the foundation of efficient software. This project helps learners:

  • Understand how data structures work internally
  • Compare algorithmic techniques
  • Prepare for coding interviews with real implementations
  • Build confidence in C++ problem solving

📝 License

This project is open-source. You may use, modify, and distribute the code freely under the MIT License (if included in the repository).


📬 Contact

Author: Shehzan Khan GitHub: ershehzan

Feedback and suggestions are always welcome!

About

A collection of essential data structure implementations in C++, including arrays, linked lists, stacks, queues, trees, graphs, heaps, and more. Perfect for learning, practicing, and preparing for coding interviews.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages