HackerRank
A collection of solutions and explanations of Hackerrank.com problems in many languages.
Solved problems of HackerRank. www.hackerrank.com
Contributions
To see every contributors, please reference at here.
Solutions
Cracking the Coding Interview (DEPRECATED)
https://www.hackerrank.com/domains/tutorials/cracking-the-coding-interview
Data Structures
Problem | Python3 | C++ | PHP |
---|---|---|---|
Arrays: Left Rotation | ✓ | ||
Strings: Making Anagrams | ✓ | ||
Hash Tables: Ransom Note | ✓ | ||
Linked Lists: Detect a Cycle | ✓ | ||
Stacks: Balanced Brackets | ✓ | ||
Queues: A Tale of Two Stacks | ✓ | ||
Tries: Contacts | ✓ |
Algorithms
Problem | Python3 | C++ | PHP |
---|---|---|---|
Sorting: Bubble Sort | ✓ | ||
Sorting: Comparator | ✓ | ||
Hash Tables: Ice Cream Parlor | ✓ | ||
DFS: Connected Cell in a Grid | ✓ |
Techniques/Concepts
Problem | Python3 | C++ | PHP |
---|---|---|---|
Time Complexity: Primality | ✓ | ||
Recursion: Fibonacci Numbers | ✓ | ||
Recursion: Davis' Staircase | ✓ | ||
DP: Coin Change | ✓ | ||
Bit Manipulation: Lonely Integer | ✓ |
Contest: OLX - Code and the Curious
https://www.hackerrank.com/contests/code-and-the-curious/challenges
Problem | Python3 | C++ | PHP |
---|---|---|---|
Sell Statistics Query System | ✓ |
Contest: Week of Code 37
Problem | Python3 | C++ | PHP |
---|---|---|---|
The Average Rating of Top Employees | ✓ | ||
Simple Language | ✓ |
Algorithms
Warmup
Problem | Python3 | C++ | PHP |
---|---|---|---|
Solve Me First | ✓ | ✓ | |
Simple Array Sum | ✓ | ✓ | |
Compare the Triplets | ✓ | ✓ | |
A Very Big Sum | ✓ | ✓ | |
Diagonal Difference | ✓ | ||
Plus Minus | ✓ | ||
Staircase | ✓ | ||
Mini-Max Sum | ✓ | ✓ | |
Birthday Cake Candles | ✓ | ✓ | |
Time Conversion | ✓ | ✓ | ✓ |
Implementation
Problem | Python3 | C++ | PHP |
---|---|---|---|
Grading Students | ✓ | ✓ | |
Apple and Orange | ✓ | ||
Kangaroo | ✓ | ||
Between Two Sets | ✓ | ||
Breaking the Records | ✓ | ||
Birthday Chocolate | ✓ | ||
Divisible Sum Pairs | ✓ | ||
Migratory Birds | ✓ | ||
Day of the Programmer | ✓ | ||
Bon Appétit | ✓ | ||
Sock Merchant | ✓ | ||
Drawing Book | ✓ | ||
Counting Valleys | ✓ | ||
Electronics Shop | ✓ | ||
Cats and a Mouse | ✓ | ||
Picking Numbers | ✓ | ||
Climbing the Leaderboard | ✓ | ||
The Hurdle Race | ✓ | ||
Designer PDF Viewer | ✓ | ||
Utopian Tree | ✓ | ||
Jumping on the Clouds: Revisited | ✓ | ||
Find Digits | ✓ | ||
Extra Long Factorials | ✓ | ||
Jumping on the Clouds | ✓ | ||
Minimum Distances | ✓ | ||
The Grid Search | ✓ | ||
Absolute Permutation | ✓ |
Strings
Problem | Python3 | C++ | PHP |
---|---|---|---|
Super Reduced String | ✓ | ||
CamelCase | ✓ | ✓ | |
Strong Password | ✓ | ||
Two Characters | ✓ | ||
Caesar Cipher | ✓ | ||
Mars Exploration | ✓ | ||
HackerRank in a String! | ✓ | ||
Pangrams | ✓ | ✓ | |
Alternating Characters | ✓ | ||
String Construction | ✓ | ||
Ashton and String | ✓ |
Sorting
Problem | Python3 | C++ | PHP |
---|---|---|---|
Big Sorting | ✓ | ||
Intro to Tutorial Challenges | ✓ | ||
Insertion Sort - Part 1 | ✓ | ||
Counting Sort 1 | ✓ |
Searching
Problem | Python3 | C++ | PHP |
---|---|---|---|
Ice Cream Parlor | ✓ |
Graph Theory
Problem | Python3 | C++ | PHP |
---|---|---|---|
Journey to the Moon | ✓ |
Greedy
Problem | Python3 | C++ | PHP |
---|---|---|---|
Marc's Cakewalk | ✓ |
Dynamic Programming
Problem | Python3 | C++ | PHP |
---|---|---|---|
The Maximum Subarray | ✓ |
Bit Manipulation
Problem | Python3 | C++ | PHP |
---|---|---|---|
Lonely Integer | ✓ | ||
Maximizing XOR | ✓ | ||
Flipping bits | ✓ |
Data Structures
Arrays
Problem | Python3 | C++ | PHP |
---|---|---|---|
Arrays - DS | ✓ | ||
2D Array - DS | ✓ | ||
Left Rotation | ✓ | ||
Is This a Binary Search Tree? | ✓ |
Linked Lists
Problem | Python3 | C++ | PHP |
---|---|---|---|
Reverse a doubly linked list | ✓ |
Functional Programming
Introduction
Problem | Clojure |
---|---|
Solve Me First FP | ✓ |
Hello World | ✓ |
Hello World N Times | ✓ |
List Replication | ✓ |
Filter Array | ✓ |
Filter Positions in a List | ✓ |
Array Of N Elements | ✓ |
Reverse a List | ✓ |
Sum of Odd Elements | ✓ |
List Length | ✓ |
Update List | ✓ |
Evaluating e^x | ✓ |
SQL
Basic Select
Problem | MySQL |
---|---|
Revising the Select Query I | ✓ |
Revising the Select Query II | ✓ |
Select All | ✓ |
Select By ID | ✓ |
Japanese Cities' Attributes | ✓ |
Japanese Cities' Names | ✓ |
Weather Observation Station 1 | ✓ |
Weather Observation Station 3 | ✓ |
Weather Observation Station 4 | ✓ |
Weather Observation Station 5 | ✓ |
Weather Observation Station 6 | ✓ |
Weather Observation Station 7 | ✓ |
Weather Observation Station 8 | ✓ |
Weather Observation Station 9 | ✓ |
Weather Observation Station 10 | ✓ |
Weather Observation Station 11 | ✓ |
Weather Observation Station 12 | ✓ |
Higher Than 75 Marks | ✓ |
Employee Names | ✓ |
Employee Salaries | ✓ |
Interview Preparation Kit
Greedy Algorithms
Problem | Python3 | C++ | PHP |
---|---|---|---|
Luck Balance | ✓ | ||
Max Min | ✓ |
Trees
Problem | Python3 | C++ | PHP |
---|---|---|---|
Binary Search Tree : Lowest Common Ancestor | ✓ |
Stacks and Queues
Problem | Python3 |
---|---|
Largest Rectangle | ✓ |