Skip to content

Abhimanyu-Gaurav/Learn-DSA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

C++ DSA Tutorial

  • Welcome to the C++ Data Structures and Algorithms (DSA) tutorial.
  • This repository contains basic to advanced level C++ programs covering various concepts in DSA.

Technologies Used:

  • C++17: The project is developed using the C++17 standard.
  • Apple Clang: Compiled using Apple's Clang version 16.0.0 (clang-1600.0.26.3) on macOS.
    • If you're using a different compiler (e.g., GCC or MSVC), ensure that it's compatible with C++17 or modify the compilation command to match your environment.

Table of Contents

Introduction

This repository provides a structured and beginner-friendly guide to C++ for learning data structures and algorithms. The tutorial covers:

  • C++ syntax basics.
  • Implementations of common data structures (arrays, linked lists, trees, etc.).
  • Algorithms for sorting, searching, and other operations.

Setup

To set up this project locally, follow these steps:

  1. Clone the repository:

    git clone https://github.com/Abhimanyu-Gaurav/Learn-DSA
    
  2. Install a C++ compiler:

  • macOS: Use Apple Clang (which comes with Xcode or Command Line Tools).
  • Linux: You can use g++ from the GNU Compiler Collection.
  • Windows: Use MinGW for C++ compilation.
  1. Navigate to the project directory:
    cd DSA_C++
    

How to Run

  • To compile and run the program, follow these steps based on your operating system:

  • Open the terminal and navigate to the project directory.

    For macOS and Linux:

    • Compile and run the program using the following command:

      g++ code.cpp && ./a.out
      
    • This command compiles code.cpp and immediately runs the compiled program (a.out).

    • If you prefer, you can also rename the output file using -o:

      g++ code.cpp -o myprogram && ./myprogram
      

    For Windows:

    • Compile the program using the following command:
      g++ code.cpp -o myprogram.exe
      
    • Run the compiled program:
      myprogram.exe
      

Explanation:

  • macOS/Linux: Use ./a.out or ./myprogram to run the compiled executable. The ./ indicates the current directory.
  • Windows: The .exe extension is automatically added to the output file, and you don’t need to type ./ before running the program. You can run it by typing myprogram.exe.

License

  • This project is licensed under the MIT License - see the License file for details.

About

This repository offers a comprehensive guide to Data Structures and Algorithms (DSA) in C++. It features clear examples and explanations, catering to both beginners and experienced programmers.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages