Some solutions to HackerRank problems & challenges
Solutions are written in Java 8 (Sadly, no Kotlin support on HackerRank yet)
Click on the green check mark for code of the challenge you are interested in. To read the task click on the link in the "Solution" column (Redirects to HackerRank)
Be careful! HackerRank needs the main class to be named "Solution". In my examples the class names are changed for the sake of navigation and readability. Also classes "Inheritance", "Abstract Classes" and "Scope" are not compilable, since those are a part of hidden logic which you had to extend during this task.
Day | Challenge | Solution | Day | Challenge | Solution |
---|---|---|---|---|---|
0 | Hello, World | ✔️ | 15 | Linked List | ✔️ |
1 | Data Types | ✔️ | 16 | Exceptions - String to Integer | TBA |
2 | Operators | ✔️ | 17 | More Exceptions | TBA |
3 | Intro to Conditional Statements | ✔️ | 18 | Queues and Stacks | TBA |
4 | Class vs. Instance | ✔️ | 19 | Interfaces | TBA |
5 | Loops | ✔️ | 20 | Sorting | TBA |
6 | Let's Review | ✔️ | 21 | Generics | TBA |
7 | Arrays | ✔️ | 22 | Binary Search Trees | TBA |
8 | Dictionaries and Maps | ✔️ | 23 | BST Level-Order Traversal | TBA |
9 | Recursion | ✔️ | 24 | More Linked Lists | TBA |
10 | Binary Numbers | ✔️ | 25 | Running Time and Complexity | TBA |
11 | 2D Arrays | ✔️ | 26 | Nested Logic | TBA |
12 | Inheritance | ✔️ | 27 | Testing | TBA |
13 | Abstract Classes | ✔️ | 28 | RegEx, Patterns, and Intro to Databases | TBA |
14 | Scope | ✔️ | 29 | Bitwise AND | TBA |
Challenge | Difficulty | Solution | |
---|---|---|---|
1 | Solve Me First | Easy | TBA |
2 | Simple Array Sum | Easy | ✔️ |
3 | Compare the Triplets | Easy | ✔️ |
4 | A Very Big Sum | Easy | ✔️ |
5 | Diagonal Difference | Easy | ✔️ |
6 | Plus Minus | Easy | ✔️ |
7 | Staircase | Easy | ✔️ |
8 | Mini-Max Sum | Easy | ✔️ |
9 | Time Conversion | Easy | ✔️ |
10 | Birthday Cake Candles | Easy | TBA |
Challenge | Difficulty | Solution | |
---|---|---|---|
1 | Grading Students | Easy | ✔️ |
2 | Sherlock and Watson | Easy | ✔️ |
3 | Extra Long Factorials | Medium | ✔️ |
Challenge | Difficulty | Solution | |
---|---|---|---|
1 | CamelCase | Easy | ✔️ |
2 | Pangrams | Easy | ✔️ |
Challenge | Difficulty | Solution | |
---|---|---|---|
1 | Arrays - DS | Easy | ✔️ |
2 | 2D Arrays - DS | Easy | ✔️ |
6 | Algorithmic Crush | Hard | ✔️ |
Challenge | Difficulty | Solution | |
---|---|---|---|
1 | Truck Tour | Hard | ✔️ |