Hackerrank Practice Problems
- This repository contains solutions to Hackerrank practice problems in SQL, C++, Java Python and Problem Solving (Data Structures and Algorithms).
- If you are interested in adding more Hackerrank problem solutions, please feel free to contribute.
- If you feel this repo is helpful for you, please do star it.
- Kindly follow CODE_OF_CONDUCT.md and CONTRIBUTING.md before contributing.
- Happy Coding ?!
Topics
SQL
- Basic Select
- Advanced Select
- Aggregation
- Basic Join
- Advanced Join
- Alternative Queries
C++
- Introduction
- Strings
- Classes
- STL
- Inheritance
- Debugging
- Other Concepts
Algorithims
* [Dynamic Programming](#dynamic-programming)
Java
- Introduction
- Strings
- BigNumber
- Data Structures
- Object Oriented Programming
- Exception Handling
- Advanced
Python
- Introduction
- Basic Data Types
- Strings
- Sets
- Math
- Itertools
- Collections
- Date and Time
- Errors and Exceptions
- Classes
- Built-Ins
- Python Functionals
- Regex and Parsing
- XML
- Closures and Decorators
- Numpy
- Debugging
SQL (All the solutions are given in MySQL)
Basic Select
| S.No. |
Problem |
Solution |
Score |
Difficulty |
| 01. |
Revising the Select Query I |
Solution |
10 |
Easy |
| 02. |
Revising the Select Query II |
Solution |
10 |
Easy |
| 03. |
Select All |
Solution |
10 |
Easy |
| 04. |
Select By ID |
Solution |
10 |
Easy |
| 05. |
Japanese Cities' Attributes |
Solution |
10 |
Easy |
| 06. |
Japanese Cities' Names |
Solution |
10 |
Easy |
| 07. |
Weather Observation Station 1 |
Solution |
15 |
Easy |
| 08. |
Weather Observation Station 3 |
Solution |
10 |
Easy |
| 09. |
Weather Observation Station 4 |
Solution |
10 |
Easy |
| 10. |
Weather Observation Station 5 |
Solution |
30 |
Easy |
| 11. |
Weather Observation Station 6 |
Solution |
10 |
Easy |
| 12. |
Weather Observation Station 7 |
Solution |
10 |
Easy |
| 13. |
Weather Observation Station 8 |
Solution |
15 |
Easy |
| 14. |
Weather Observation Station 9 |
Solution |
10 |
Easy |
| 15. |
Weather Observation Station 10 |
Solution |
10 |
Easy |
| 16. |
Weather Observation Station 11 |
Solution |
15 |
Easy |
| 17. |
Weather Observation Station 12 |
Solution |
15 |
Easy |
| 18. |
Higher Than 75 Marks |
Solution |
15 |
Easy |
| 19. |
Employee Names |
Solution |
10 |
Easy |
| 20. |
Employee Salaries |
Solution |
10 |
Easy |
Advanced Select
| S.No. |
Problem |
Solution |
Score |
Difficulty |
| 01. |
Type of Triangle |
Solution |
20 |
Easy |
| 02. |
The PADS |
Solution |
30 |
Medium |
| 03. |
Occupations |
Solution |
30 |
Medium |
| 04. |
Binary Tree Nodes |
Solution |
30 |
Medium |
| 05. |
New Companies |
Solution |
30 |
Medium |
Aggregation
| S.No. |
Problem |
Solution |
Score |
Difficulty |
| 01. |
Revising Aggregations - The Count Function |
Solution |
10 |
Easy |
| 02. |
Revising Aggregations - The Sum Function |
Solution |
10 |
Easy |
| 03. |
Revising Aggregations - Averages |
Solution |
10 |
Easy |
| 04. |
Average Population |
Solution |
10 |
Easy |
| 05. |
Japan Population |
Solution |
10 |
Easy |
| 06. |
Population Density Difference |
Solution |
10 |
Easy |
| 07. |
The Blunder |
solution |
15 |
Easy |
| 08. |
Top Earners |
Solution |
20 |
Easy |
| 09. |
Weather Observation Station 2 |
Solution |
15 |
Easy |
| 10. |
Weather Observation Station 13 |
Solution |
10 |
Easy |
| 11. |
Weather Observation Station 14 |
Solution |
10 |
Easy |
| 12. |
Weather Observation Station 15 |
Solution |
15 |
Easy |
| 13. |
Weather Observation Station 16 |
Solution |
10 |
Easy |
| 14. |
Weather Observation Station 17 |
Solution |
15 |
Easy |
| 15. |
Weather Observation Station 18 |
Solution |
25 |
Medium |
| 16. |
Weather Observation Station 19 |
Solution |
30 |
Medium |
| 17. |
Weather Observation Station 20 |
Solution |
40 |
Medium |
Basic Join
| S.No. |
Problem |
Solution |
Score |
Difficulty |
| 01. |
Population Census |
Solution |
10 |
Easy |
| 02. |
African Cities |
Solution |
10 |
Easy |
| 03. |
Average Population of Each Continent |
Solution |
10 |
Easy |
| 04. |
The Report |
Solution |
20 |
Medium |
| 05. |
Top Competitors |
Solution |
30 |
Medium |
| 06. |
Ollivander's Inventory |
Solution |
30 |
Medium |
| 07. |
Challenges |
Solution |
30 |
Medium |
| 08. |
Contest Leaderboard |
Solution |
30 |
Medium |
Advanced Join
| S.No. |
Problem |
Solution |
Score |
Difficulty |
| 01. |
SQL Project Planning |
Solution |
40 |
Medium |
| 02. |
SQL Symmetric Pairs |
Solution |
40 |
Medium |
| 03. |
15 Days of Learning SQL |
Solution |
40 |
Medium |
Alternative Queries
| S.No. |
Problem |
Solution |
Score |
Difficulty |
| 01. |
Draw The Triangle 1 |
Solution |
25 |
Easy |
| 02. |
Draw The Triangle 2 |
Solution |
25 |
Easy |
C++
Introduction
| S.No. |
Problem |
Solution |
Score |
Difficulty |
| 01. |
Arrays Introduction |
Solution |
10 |
Easy |
| 02. |
Basic Data Types |
Solution |
10 |
Easy |
| 03. |
Conditional Statements |
Solution |
10 |
Easy |
| 04. |
For Loop |
Solution |
10 |
Easy |
| 05. |
Pointer |
Solution |
10 |
Easy |
| 06. |
Say "Hello, World!" With C++ |
Solution |
05 |
Easy |
| 07. |
Variable Sized Arrays |
Solution |
30 |
Easy |
| 08. |
Input and Output |
Solution |
05 |
Easy |
Strings
| S.No. |
Problem |
Solution |
Score |
Difficulty |
| 01. |
Attribute Parser |
Solution |
35 |
Medium |
| 02. |
StringStream |
Solution |
10 |
Easy |
| 03. |
Strings |
Solution |
10 |
Easy |
Classes
| S.No. |
Problem |
Solution |
Score |
Difficulty |
| 01. |
Class |
Solution |
10 |
Easy |
| 02. |
Structs |
Solution |
10 |
Easy |
STL
| S.No. |
Problem |
Solution |
Score |
Difficulty |
| 01. |
Deque-STL |
Solution |
50 |
Medium |
| 02. |
Lower Bound-STL |
Solution |
15 |
Easy |
| 03. |
Sets-STL |
Solution |
15 |
Easy |
| 04. |
Vector-Sort |
Solution |
10 |
Easy |
Inheritance
| S.No. |
Problem |
Solution |
Score |
Difficulty |
| 01. |
Multi Level Inheritance |
Solution |
50 |
Medium |
| 02. |
Rectangle Area |
Solution |
25 |
Easy |
Debugging
| S.No. |
Problem |
Solution |
Score |
Difficulty |
| 01. |
CPP Exception Handling |
Solution |
20 |
Medium |
| 02. |
Overloading Ostream Operator |
Solution |
20 |
Medium |
Other Concepts
| S.No. |
Problem |
Solution |
Score |
Difficulty |
| 01. |
Operator Overloading |
Solution |
25 |
Medium |
Algorithims
Dynamic programming
| S.No. |
Problem |
Solution |
Score |
Difficulty |
| 01. |
The Coin Change Problem |
Solution |
60 |
Medium |
| 02. |
Equal |
Solution |
30 |
Medium |
| 03. |
Stock Maximize |
Solution |
50 |
Medium |
Java
Introduction
| S.No. |
Problem |
Solution |
Score |
Difficulty |
| 01. |
Java Date and Time |
Solution |
15 |
Easy |
| 02. |
Java If-Else |
Solution |
10 |
Easy |
| 03. |
Java Int to String |
Solution |
10 |
Easy |
| 04. |
Java Loops II |
Solution |
10 |
Easy |
| 05. |
Java Stdin and Stdout I |
Solution |
05 |
Easy |
| 06. |
Java Stdin and Stdout II |
Solution |
10 |
Easy |
| 07. |
Welcome To Java |
Solution |
03 |
Easy |
Strings
| S.No. |
Problem |
Solution |
Score |
Difficulty |
| 01. |
Java Substring |
Solution |
05 |
Easy |
BigNumber
| S.No. |
Problem |
Solution |
Score |
Difficulty |
Data Structures
| S.No. |
Problem |
Solution |
Score |
Difficulty |
| 01. |
Java 1D Array |
Solution |
05 |
Easy |
| 02. |
Java Stack |
Solution |
20 |
Medium |
Object Oriented Programming
| S.No. |
Problem |
Solution |
Score |
Difficulty |
| 01. |
Java Abstract Class |
Solution |
10 |
Easy |
| 02. |
Java Inheritance I |
Solution |
05 |
Easy |
| 03. |
Java Inheritance II |
Solution |
10 |
Easy |
Python
Introduction
| S.No. |
Problem |
Solution |
Score |
Difficulty |
| 01. |
Loops |
Solution |
10 |
Easy |
| 02. |
Python Division |
Solution |
10 |
Easy |
| 03. |
Python If-Else |
Solution |
10 |
Easy |
| 04. |
Write a Function |
Solution |
10 |
Medium |
Basic Data Types
| S.No. |
Problem |
Solution |
Score |
Difficulty |
| 01. |
Finding the Runner-Up Score |
Solution |
10 |
Easy |
| 02. |
Finding the percentage |
Solution |
10 |
Easy |
| 03. |
List Comprehensions |
Solution |
10 |
Easy |
Strings
| S.No. |
Problem |
Solution |
Score |
Difficulty |
| 01. |
sWAP CASE |
Solution |
10 |
Easy |