🧩 Algorithms & Problem Solving — Level 1
A structured C++ problem-solving journey focused on programming fundamentals, logic building, functions, conditions, loops, arrays, validation, and practical algorithms.
Overview •
Roadmap •
All Problems •
Skills
🎯 Overview
This repository contains 50 C++ problem-solving exercises arranged as a progressive learning path. Each problem has its own folder and a dedicated source file so it is easy to study, run, compare, and revisit.
Learn → Solve → Compare → Practice → Improve
| 📊 Repository |
Details |
| 🧩 Problems |
50 |
| 💻 Language |
C++ |
| 📁 Organization |
One folder per problem |
| 🔁 Alternative approaches |
Kept separately when available |
| 🧹 File naming |
Clean - separators |
🧭 Quick Navigation
| Range |
Focus |
Link |
| 01–10 |
Functions, input/output, structs, enums, arithmetic |
Explore |
| 11–20 |
Averages, comparisons, swapping, geometry |
Explore |
| 21–30 |
Validation, loops, odd/even, factorial, prime logic |
Explore |
| 31–40 |
Powers, grades, commission, currency, calculator, billing |
Explore |
| 41–50 |
Time, menus, letters, loans, ATM logic |
Explore |
📚 Roadmap
🧠 Problems 01–10
| # |
Problem |
Main concept |
🔗 |
| 01 |
Print Name |
Functions and parameters |
▶ View Code |
| 02 |
Read And Print Name |
Input, strings, functions |
▶ View Code |
| 03 |
Check Number Type |
Enums, modulo, functions |
▶ View Code |
| 04 |
Employee Hiring Decision |
Structs and conditions |
▶ View Code |
| 05 |
Employee Hiring With Recommendation |
Structs and combined conditions |
▶ View Code |
| 06 |
Full Name With Reverse Option |
Strings and conditional logic |
▶ View Code |
| 07 |
Half Number |
Arithmetic and functions |
▶ View Code |
| 08 |
Pass Or Fail |
Conditions and validation |
▶ View Code |
| 09 |
Sum Of Three Numbers |
Parameters and arithmetic |
▶ View Code |
| 10 |
Average Of Three Numbers |
Arithmetic and floating point |
▶ View Code |
🔢 Problems 11–20
| # |
Problem |
Main concept |
🔗 |
| 11 |
Average And Pass Or Fail |
Functions and conditions |
▶ View Code |
| 12 |
Maximum Of Two Numbers |
Comparison and functions |
▶ View Code |
| 13 |
Maximum Of Three Numbers |
Multi-value comparison |
▶ View Code |
| 14 |
Swap Two Numbers |
Variables and swapping |
▶ View Code |
| 15 |
Rectangle Area |
Geometry and arithmetic |
▶ View Code |
| 16 |
Rectangle Area By Side And Diagonal |
Geometry and formulas |
▶ View Code |
| 17 |
Triangle Area |
Geometry and formulas |
▶ View Code |
| 18 |
Circle Area By Radius |
Geometry and pi |
▶ View Code |
| 19 |
Circle Area By Diameter |
Geometry and diameter/radius |
▶ View Code |
| 20 |
Circle Area Inscribed In A Square |
Geometry and formulas |
▶ View Code |
🧮 Problems 21–30
| # |
Problem |
Main concept |
🔗 |
| 21 |
Circle Area By Circumference |
Geometry and formulas |
▶ View Code |
| 22 |
Circle Area Inscribed In An Isosceles Triangle |
Geometry and formulas |
▶ View Code |
| 23 |
Circle Area Described Around A Triangle |
Geometry and formulas |
▶ View Code |
| 24 |
Validate Age Once |
Input validation |
▶ View Code |
| 25 |
Validate Age Until Valid |
Loops and validation |
▶ View Code |
| 26 |
Print Numbers From 1 To N |
for loops |
▶ View Code |
| 27 |
Print Numbers From N To 1 |
Reverse iteration |
▶ View Code |
| 28 |
Sum Odd Numbers From 1 To N |
Conditions and accumulation |
▶ View Code |
| 29 |
Sum Even Numbers From 1 To N |
Conditions and accumulation |
▶ View Code |
| 30 |
Factorial |
Loops and multiplication |
▶ View Code |
🧠 Problems 31–40
| # |
Problem |
Main concept |
🔗 |
| 31 |
Number Powers 2, 3 And 4 |
Loops and powers |
▶ View Code |
| 32 |
Number Power M |
General power calculation |
▶ View Code |
| 33 |
Grade Classification |
Conditions and ranges |
▶ View Code |
| 34 |
Sales Commission |
Business logic and conditions |
▶ View Code |
| 35 |
Currency Conversion |
Arithmetic and input |
▶ View Code |
| 36 |
Simple Calculator |
switch and operators |
▶ View Code |
| 37 |
Sum Positive Numbers |
Validation and accumulation |
▶ View Code |
| 38 |
Prime Number Check |
Divisibility and loops |
▶ View Code |
| 39 |
Cash Remainder |
Integer arithmetic |
▶ View Code |
| 40 |
Bill With Service Fee And Tax |
Multi-step calculations |
▶ View Code |
🕒 Problems 41–50
| # |
Problem |
Main concept |
🔗 |
| 41 |
Convert Hours To Weeks And Days |
Unit conversion |
▶ View Code |
| 42 |
Task Duration In Seconds |
Time conversion |
▶ View Code |
| 43 |
Convert Seconds To Days, Hours, Minutes, Seconds |
Decomposition and conversion |
▶ View Code |
| 44 |
Week Day Menu |
Menu and switch |
▶ View Code |
| 45 |
Month Menu |
Menu and switch |
▶ View Code |
| 46 |
Print Letters A To Z |
Character loops |
▶ View Code |
| 47 |
Loan Settlement In Months |
Arithmetic and division |
▶ View Code |
| 48 |
Loan Installment By Months |
Arithmetic and payment logic |
▶ View Code |
| 49 |
ATM PIN Check |
Conditions and authentication logic |
▶ View Code |
| 50 |
ATM PIN With 3 Attempts |
Loops and validation |
▶ View Code |
🧠 Skills Covered
| ✅ Functions |
✅ Structs |
✅ Enums |
✅ Conditions |
| ✅ Loops |
✅ Validation |
✅ Arrays |
✅ Strings |
| ✅ Arithmetic |
✅ Geometry |
✅ Menus |
✅ Basic Algorithms |
📁 Repository Structure
Algorithms-Problem-Solving-Level-1/
│
├── Problem-01-Print-Name/
│ └── Solution-01.cpp
│
├── Problem-02-Read-And-Print-Name/
│ └── Solution-01.cpp
│
├── ...
│
├── Problem-50-ATM-PIN-With-3-Attempts/
│ └── Solution-01.cpp
│
└── README.md
🔁 Solution Organization
When a problem has multiple approaches, they remain as separate files instead of overwriting each other. This makes comparison and review easier.
🧹 Naming Convention
Folders and source files use clean - separators instead of spaces or unnecessary special characters. The result is simpler paths for GitHub, terminals, IDEs, and local compilation.
🚀 Recommended Learning Flow
Read the problem → Try it yourself → Run your solution → Compare alternatives → Refactor → Move to the next problem.
📘 Learn • 💻 Practice • 🧠 Solve • 🚀 Build
评论