- 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.
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.
To set up this project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/Abhimanyu-Gaurav/Learn-DSA
-
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.
- Navigate to the project directory:
cd DSA_C++
-
To compile and run the program, follow these steps based on your operating system:
-
Open the terminal and navigate to the project directory.
-
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
- Compile the program using the following command:
g++ code.cpp -o myprogram.exe
- Run the compiled program:
myprogram.exe
-
- 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.
- This project is licensed under the MIT License - see the License file for details.