Optimized Array Problem Navigator is a C++ console-based application built using core object-oriented programming principles to present categorized array problems along with their optimal time and space complexities for efficient learning.
It provides a structured way to review commonly asked array-based DSA problems across multiple categories such as Two Pointer, Bit Manipulation, Kadane’s Algorithm, and more. The focus is on efficiency, pattern recognition, and complexity analysis.
- Covers 17 categorized array problem types
- Displays only optimal time and space complexity for each problem
- Demonstrates core OOP principles:
- Abstraction using an abstract base class
ArrayBase - Encapsulation through a well-defined
Problemclass - Inheritance via category-specific derived classes
- Polymorphism using virtual function overriding
- Abstraction using an abstract base class
- Implemented entirely in C++
- No file system or database dependency
- Suitable for DSA revision and OOP demonstration in interviews
| Technology | Purpose |
|---|---|
| C++ | Core development using OOP |
| OOP | Design, structure, and logic modeling |
| Console UI | Command-line based navigation |
- Bit Manipulation
- Simple Traversal
- Math Operation + Traversal
- Sorting + Traversal
- Unordered Set + Traversal
- Two-Pointer Approach
- Sorting + Pointers
- Reverse + Traversal
- Stock Buy and Sell
- Dutch National Flag Algorithm
- Moore’s Voting Algorithm
- Matrix-Based Problems
- Merge Sort Advanced
- Prefix Sum + Hashmap
- Prefix XOR + Hashmap
- Kadane’s Algorithm
- Subarray Problems
Each category contains selected DSA problems along with only their optimal time and space complexities.
| OOP Pillar | Implementation |
|---|---|
| Abstraction | Abstract class ArrayBase with pure virtual methods |
| Encapsulation | Class Problem hides internal state and provides public getters |
| Inheritance | Derived classes like BitManipulationProblems inherit from ArrayProblemSet |
| Polymorphism | Virtual method showProblemList() and showOptimalComplexity() overridden |
-
Clone this repository:
git clone https://github.com/your-username/Optimized-Array-Problem-Navigator.git cd Optimized-Array-Problem-Navigator -
Compile and run the program:
g++ home.cpp -o home ./home
-
Follow the console instructions to navigate through categories.
- Quick revision for DSA interviews
- Teaching aid for Object-Oriented Programming
- Showcasing real-world application of OOP in C++
- Strengthening complexity analysis mindset
