Awesome
HackerRank Algorithms Solutions
This repository contains solutions to the Algorithms Domain part of HackerRank. The Algorithms Domain Falls under a broader Problem Solving Skill Set in HackerRank which consists of both Data Structures and Algorithms.
The Algorithms Domain is further Divided into the following sub-domains. To Contribute have a look at Contributing.md and happy coding 😀 🐱💻.
Sub Domains & Problems (+Solutions) in the Algorithms Domain
⚡ Quick Links: Warm up | Implementation | Strings | Sorting | Search | Graph Theory | Greedy | Dynamic Programming | Constructive Algorithms | Bit Manipulation | Recursion | Game Theory | NP Complete | Debugging
Warmup
Problem | Difficulty | Solution Link |
---|---|---|
Solve Me First | Easy | |
Simple Array Sum | Easy | |
Compare The Triplets | Easy | |
A very Big Sum | Easy | |
Diagonal Difference | Easy | |
Plus Minus | Easy | |
Staircase | Easy | |
Mini-Max Sum | Easy | |
Birthday Cake Candles | Easy | |
Time Conversion | Easy |
Implementation
Strings
Sorting
Problem | Difficulty | Solution Link |
---|---|---|
Insertion Sort - Part 1 | Easy | |
Insertion Sort - Part 2 | Easy | |
Running Time of Algorithms | Easy | |
Quicksort 1 - Partition | Easy | |
Fraudulent Activity Notifications | Medium | |
Lily's Homework | Medium | |
Insertion Sort Advanced Analysis | Advanced |
Search
Problem | Difficulty | Solution Link |
---|---|---|
Missing Numbers | Easy | |
Hackerland Radio Transmitters | Medium | |
Gridland Metro | Medium | |
KnightL On ChessBoard | Medium | |
Minimum Loss | Medium | |
Short Palindrome | Medium | |
Count Luck | Medium | |
Cut The Tree | Medium | |
Gena Playing Hanoi | Medium | |
Beautiful Quadruples | Medium | |
Red Knight's Shortest Path | Medium | |
Maximizing Mission Points | Hard | |
Making Candies | Hard | |
Bike Racers | Hard | |
Task Scheduling | Hard | |
Similar Pair | Hard | |
Absolute Element Sum | Hard | |
Almost Integer Rock Garden | Hard | |
Sorted Subsegments | Hard | |
Distant Pairs | Hard | |
Knight Richard's Knights | Hard |
Graph Theory
Greedy
Problem | Difficulty | Solution Link |
---|---|---|
Minimum Absolute Difference In Array | Easy | |
Marc's Cakewalk | Easy | |
Grid Challenge | Easy | |
Luck Balance | Easy | |
Maximum Perimeter Triangle | Easy | |
Beautiful Pairs | Easy | |
Sherlock and The Beast | Easy | |
Priyanka and Toys | Easy | |
Largest Permutation | Easy | |
Mark and Toys | Easy | |
Jim and The Orders | Easy | |
Permuting Two Arrays | Easy | |
Candies | Medium | |
Greedy Florist | Medium | |
Max Min | Medium | |
Cloudy Day | Medium | |
Cutting Boards | Hard | |
Chief Hopper | Hard | |
Sherlock and MinMax | Hard | |
Accessory Collection | Hard | |
Fighting Pits | Hard | |
Reverse Shuffle Merge | Advanced | |
Team Formation | Advanced |
Dynamic Programming
Constructive Algorithms
Problem | Difficulty | Solution Link |
---|---|---|
Lena Sort | Medium | |
Flipping The Matrix | Medium | |
Gaming Array | Medium | |
New Year Chaos | Medium | |
Bonetrousle | Medium | |
Yet Another KMP Problem | Hard | |
Beautiful 3 Set | Hard | |
Inverse RMQ | Hard | |
Lovely Triplets | Advanced | |
Array Construction | Advanced | |
Two Subarrays | Expert |
Bit Manipulation
Problem | Difficulty | Solution Link |
---|---|---|
Lonely Integer | Easy | |
Maximizing XOR | Easy | |
Sum vs XOR | Easy | |
Flipping Bits | Easy | |
Counter Game | Medium | |
Xor-sequence | Medium | |
The Great XOR | Medium | |
Yet Another Minimax Problem | Medium | |
Sansa and XOR | Medium | |
AND Product | Medium | |
Winning Lottery Ticket | Medium | |
Cipher | Medium | |
What's Next? | Medium | |
A or B | Medium | |
Xoring Ninja | Hard | |
XOR Matrix | Hard | |
String Transmission | Hard | |
Manipulative Numbers | Hard | |
Stone Game | Hard | |
Mixing Proteins | Hard | |
Maximizing The Function | Hard | |
2's Complement | Advanced | |
Changing Bits | Advanced | |
XOR Key | Advanced | |
XOR Subsequences | Advanced | |
Iterate It | Expert | |
Hamming Distance | Expert |
Recursion
Problem | Difficulty | Solution Link |
---|---|---|
The Power Sum | Medium | |
Crossword Puzzle | Medium | |
Recursive Digit Sum | Medium | |
Simplified Chess Engine | Medium | |
Password Cracker | Medium | |
Stone Division, Revisited | Medium | |
Arithmetic Expressions | Hard | |
K Factorization | Hard | |
Bowling Pins | Hard | |
Simplified Chess Engine II | Hard | |
Repitive K-Sums | Advanced |
Game Theory
Problem | Difficulty | Solution Link |
---|---|---|
Game Of Stones | Easy | |
Tower Breaker | Easy | |
A Chessboard Game | Easy | |
Introduction To Nim Game | Easy | |
Misère Nim | Easy | |
Nimble Game | Easy | |
Poker Nim | Easy | |
Alice and Bob's Silly Game | Medium | |
Tower Breakers, Revisited! | Medium | |
Tower Breakers, Again! | Medium | |
Zero Move Nim | Medium | |
Chessboard Game Again | Medium | |
Digits Square Board | Medium | |
Fun Game | Medium | |
Chocolate In Box | Medium | |
Kitty and Katty | Medium | |
Powers Game | Medium | |
Deforestation | Medium | |
Bob and Ben | Medium | |
Tower Breakers - The Final Battle | Medium | |
Permutation Game | Medium | |
Play on Benders | Medium | |
New Year Game | Medium | |
Vertical Rooks | Medium | |
A Stone Game | Medium | |
Stone Division | Hard | |
Simple Game | Hard | |
Move The Coins | Hard | |
Stone Piles | Hard | |
Chocolate Game | Hard | |
The Prime Game | Hard | |
Tastes Like Winning | Expert |
NP Complete
Problem | Difficulty | Solution Link |
---|---|---|
Walking The Approximate Longest Path | Hard | |
Sam's Puzzle (Approximate) | Advanced | |
Spies, Revised | Expert | |
TBS Problem | Expert |
Debugging
Problem | Difficulty | Solution Link |
---|---|---|
XOR Strings | Easy | |
Smart Number | Easy | |
Prime Dates | Medium | |
Minimum Operations | Medium | |
Zig Zag Sequence | Medium |