This repository contains a collection of C++ programs focused on array-based problems, suitable for beginners and intermediate learners looking to practice data structures and algorithms.
- C++ solutions to common array-related problems
- Code for 1D and 2D arrays
- Classic interview questions like:
- Reverse an array
- Find max/min element
- Linear search
- Binary search
- Matrix traversal
- Sorting techniques
- Well-commented code for better understanding
Array/
├── 1D/
│ ├── reverse_array.cpp
│ ├── linear_search.cpp
│ ├── binary_search.cpp
│ └── ...
├── 2D/
│ ├── matrix_input_output.cpp
│ ├── transpose_matrix.cpp
│ └── ...
└── README.md
- Language: C++
- IDE: Any C++ compatible IDE (e.g., CodeBlocks, Visual Studio, or VS Code)
- Compiler: g++ or any C++17+ compliant compiler
To run any program:
-
Clone this repository:
git clone https://github.com/Yash-Lade/Array.git
-
Navigate to the project directory:
cd Array
-
Compile and run the desired
.cpp
file using g++:g++ 1D/reverse_array.cpp -o reverse ./reverse
Contributions are welcome! If you have a new array problem or an optimized solution, feel free to create a pull request.
- Fork the repository
- Create a new branch (
git checkout -b feature-name
) - Commit your changes (
git commit -m "Add your message"
) - Push to the branch (
git push origin feature-name
) - Open a Pull Request
This project is licensed under the MIT License.
Author: Yash Lade