Home

Awesome

<p align="center"> <a href="https://www.hackerrank.com/RodneyShag"> <img height=85 src="https://user-images.githubusercontent.com/1194257/65596422-1cef2080-df97-11e9-9abb-a225204d1805.png"> </a> <br>317 efficient solutions to HackerRank problems </p>

Solutions are coded using Java 8

SQL solutions are coded using MySQL

10 Days of Statistics

DayChallengePointsSolution
0Mean, Median, and Mode30Solution.java
0Weighted Mean30Solution.java
1Quartiles30Solution.java
1Interquartile Range30Solution.java
1Standard Deviation30Solution.java
2Basic Probability10Solution
2More Dice10Solution
2Compound Event Probability10Solution
3Conditional Probability10Solution
3Cards of the Same Suit10Solution
3Drawing Marbles10Solution
4Binomial Distribution I30Solution.java
4Binomial Distribution II30Solution.java
4Geometric Distribution I30Solution.java
4Geometric Distribution II30Solution.java
5Poisson Distribution I30Solution.java
5Poisson Distribution II30Solution.java
5Normal Distribution I30Solution.java
5Normal Distribution II30Solution.java
6The Central Limit Theorem I30Solution.java
6The Central Limit Theorem II30Solution.java
6The Central Limit Theorem III30Solution.java
7Pearson Correlation Coefficient I30Solution.java
7Spearman's Rank Correlation Coefficient30Solution.java
8Least Square Regression Line30Solution.java
8Pearson Correlation Coefficient II30Solution
9Multiple Linear Regression30Solution.java

30 Days of Code

DayChallengePointsSolution
0Hello, World30Solution.java
1Data Types30Solution.java
2Operators30Solution.java
3Intro to Conditional Statements30Solution.java
4Class vs. Instance30Solution.java
5Loops30Solution.java
6Let's Review30Solution.java
7Arrays30Solution.java
8Dictionaries and Maps30Solution.java
9Recursion30Solution.java
10Binary Numbers30Solution.java
112D Arrays30Solution.java
12Inheritance30Solution.java
13Abstract Classes30Solution.java
14Scope30Solution.java
15Linked List30Solution.java
16Exceptions - String to Integer30Solution.java
17More Exceptions30Solution.java
18Queues and Stacks30Solution.java
19Interfaces30Solution.java
20Sorting30Solution.java
21Generics30Solution.java
22Binary Search Trees30Solution.java
23BST Level-Order Traversal30Solution.java
24More Linked Lists30Solution.java
25Running Time and Complexity30Solution.java
26Nested Logic30Solution.java
27Testing30Solution.java

Algorithms

SubdomainChallengePointsSolution
SortingQuicksort 1 - Partition10Solution.java
SortingMarc's Cakewalk15Solution.java
SortingMinimum Absolute Difference in an Array15Solution.java
SortingLuck Balance20Solution.java
SortingInsertion Sort - Part 130Solution.java
SortingInsertion Sort - Part 230Solution.java
SortingCorrectness and the Loop Invariant30Solution.java
SortingRunning Time of Algorithms30Solution.java
SortingQuicksort 2 - Sorting30Solution.java
SortingCounting Sort 130Solution.java
SortingCounting Sort 230Solution.java
SortingCounting Sort 330Solution.java
SortingIntro to Tutorial Challenges30Solution.java
SortingQuicksort In-Place35Solution.java
SortingRunning Time of Quicksort35Solution.java
SortingThe Full Counting Sort40Solution.java
SearchIce Cream Parlor30Solution.java
SearchConnected Cells in a Grid50Solution.java
GreedyGrid Challenge20Solution.java
GreedyMaximum Perimeter Triangle20Solution.java
GreedyBeautiful Pairs30Solution.java
Graph TheoryBreadth First Search - Shortest Reach55Solution.java
StringsSuper Reduced String10Solution.java
StringsCamelCase15Solution.java
StringsTwo Characters15Solution.java
StringsCaesar Cipher15Solution.java
StringsMars Exploration15Solution.java
StringsWeighted Uniform Strings20Solution.java
StringsGemstones20Solution.java
StringsAlternating Characters20Solution.java
StringsBeautiful Binary String20Solution.java
StringsThe Love-Letter Mystery20Solution.java
StringsString Construction25Solution.java
Dynamic ProgrammingThe Coin Change Problem60Solution.java
Bit ManipulationLonely Integer20Solution.java
Bit ManipulationBit Manipulation: Lonely Integer20Solution.java
Bit ManipulationSum vs XOR25Solution.java
Bit ManipulationMaximizing XOR30Solution.java
Bit ManipulationSansa and XOR30Solution.java
Bit ManipulationCounter game30Solution.java

Cracking the Coding Interview

TopicChallengePointsSolution
Techniques / ConceptsTime Complexity: Primality15Solution.java
Techniques / ConceptsRecursion: Fibonacci Numbers20Solution.java
Techniques / ConceptsRecursion: Davis' Staircase30Solution.java
Techniques / ConceptsDP: Coin Change30Solution.java
Techniques / ConceptsBit Manipulation: Lonely Integer60Solution.java
Data StructuresArrays: Left Rotation20Solution.java
Data StructuresStrings: Making Anagrams25Solution.java
Data StructuresHash Tables: Ransom Note25Solution.java
Data StructuresLinked Lists: Detect a Cycle25Solution.java
Data StructuresStacks: Balanced Brackets30Solution.java
Data StructuresQueues: A Tale of Two Stacks30Solution.java
Data StructuresTrees: Is This a Binary Search Tree?30Solution.java
Data StructuresHeaps: Find the Running Median50Solution.java
Data StructuresTries: Contacts50Solution.java
AlgorithmsSorting: Bubble Sort30Solution.java
AlgorithmsSorting: Comparator35Solution.java
AlgorithmsMerge Sort: Counting Inversions35Solution.java
AlgorithmsBinary Search: Ice Cream Parlor45Solution.java
AlgorithmsDFS: Connected Cell in a Grid45Solution.java
AlgorithmsBFS: Shortest Reach in a Graph45Solution.java

Data Structures

SubdomainChallengePointsSolution
ArraysArrays - DS10Solution.java
Arrays2D Array - DS15Solution.java
ArraysDynamic Array15Solution.java
ArraysLeft Rotation20Solution.java
ArraysSparse Arrays25Solution.java
ArraysAlgorithmic Crush60Solution.java
StacksMaximum Element20Solution.java
StacksBalanced Brackets25Solution.java
TreesTree: Preorder Traversal10Solution.java
TreesTree: Inorder Traversal10Solution.java
TreesTree: Postorder Traversal10Solution.java
TreesTree: Height of a Binary Tree10Solution.java
TreesTree: Level Order Traversal20Solution.java
TreesTree: Huffman Decoding20Solution.java
TreesBinary Search Tree: Insertion20Solution.java
TreesBinary Search Tree: Lowest Common Ancestor30Solution.java
TreesIs This a Binary Search Tree?30Solution.java
TreesSwap Nodes [Algo]40Solution.java
TreesSquare-Ten Tree60Solution.java
Linked ListPrint the Elements of a Linked List5Solution.java
Linked ListInsert a node at the head of a linked list5Solution.java
Linked ListInsert a Node at the Tail of a Linked List5Solution.java
Linked ListInsert a node at a specific position in a linked list5Solution.java
Linked ListDelete a Node5Solution.java
Linked ListPrint in Reverse5Solution.java
Linked ListReverse a linked list5Solution.java
Linked ListCompare two linked lists5Solution.java
Linked ListMerge two sorted linked lists5Solution.java
Linked ListGet Node Value5Solution.java
Linked ListDelete duplicate-value nodes from a sorted linked list5Solution.java
Linked ListCycle Detection5Solution.java
Linked ListFind Merge Point of Two Lists5Solution.java
Linked ListInserting a Node Into a Sorted Doubly Linked List5Solution.java
Linked ListReverse a doubly linked list5Solution.java
TriesContacts40Solution.java
QueuesQueue using Two Stacks30Solution.java
HeapsFind the Running Median50Solution.java
Multiple ChoiceData Structures MCQ 15Solution
Multiple ChoiceData Structures MCQ 25Solution
Multiple ChoiceData Structures MCQ 35Solution

General Programming

SubdomainChallengePointsSolution
Basic ProgrammingSolve Me First1Solution.java
Basic ProgrammingStaircase10Solution.java
Basic ProgrammingPlus Minus10Solution.java
Basic ProgrammingDiagonal Difference10Solution.java
Basic ProgrammingA Very Big Sum10Solution.java
Basic ProgrammingSimple Array Sum10Solution.java
Basic ProgrammingCompare the Triplets10Solution.java
Basic ProgrammingDivisible Sum Pairs10Solution.java
Basic ProgrammingKangaroo10Solution.java
Basic ProgrammingDrawing Book10Solution.java
Basic ProgrammingBirthday Cake Candles10Solution.java
Basic ProgrammingBon Appetit10Solution.java
Basic ProgrammingSock Merchant10Solution.java
Basic ProgrammingApple and Orange10Solution.java
Basic ProgrammingBetween Two Sets10Solution.java
Basic ProgrammingMini-max Sum10Solution.java
Basic ProgrammingGrading Students10Solution.java
Basic ProgrammingBreaking the Records10Solution.java
Basic ProgrammingMigratory Birds10Solution.java
Basic ProgrammingBirthday Chocolate10Solution.java
Basic ProgrammingTime Conversion15Solution.java
Basic ProgrammingLibrary Fine15Solution.java
Basic ProgrammingSave the Prisoner!15Solution.java
Basic ProgrammingJumping on the Clouds - Revisited15Solution.java
Basic ProgrammingCounting Valleys15Solution.java
Basic ProgrammingViral Advertising15Solution.java
Basic ProgrammingBeautiful Days at the Movies15Solution.java
Basic ProgrammingElectronics Shop15Solution.java
Basic ProgrammingCats and a Mouse15Solution.java
Basic ProgrammingThe Hurdle Race15Solution.java
Basic ProgrammingUtopian Tree20Solution.java
Basic ProgrammingCircular Array Rotation20Solution.java
Basic ProgrammingSherlock and Squares20Solution.java
Basic ProgrammingAngry Professor20Solution.java
Basic ProgrammingExtra Long Factorials20Solution.java
Basic ProgrammingMinimum Distances20Solution.java
Basic ProgrammingJumping on the Clouds20Solution.java
Basic ProgrammingEqualize the Array20Solution.java
Basic ProgrammingDesigner PDF Viewer20Solution.java
Basic ProgrammingRepeated String20Solution.java
Basic ProgrammingAppend and Delete20Solution.java
Basic ProgrammingPicking Numbers20Solution.java
Basic ProgrammingClimbing the Leaderboard20Solution.java
Basic ProgrammingSequence Equation20Solution.java
Basic ProgrammingFind Digits25Solution.java
Basic ProgrammingCut the sticks25Solution.java
Basic ProgrammingTaum and B'day25Solution.java
Basic ProgrammingFlatland Space Stations25Solution.java
Basic ProgrammingFair Rations25Solution.java
Basic ProgrammingManasa and Stones30Solution.java
Object-Oriented ProgrammingClass vs. Instance30Solution.java
Object-Oriented ProgrammingInheritance30Solution.java
Object-Oriented ProgrammingAbstract Classes30Solution.java
RegExHackerRank in a String!20Solution.java

Implementation

SubdomainChallengePointsSolution
Brute ForcePangrams20Solution.java
Brute ForceStrings: Making Anagrams25Solution.java
Brute ForceMaking Anagrams30Solution.java
Brute ForceModified Kaprekar Numbers30Solution.java

Java

SubdomainChallengePointsSolution
IntroductionWelcome to Java!3Solution.java
IntroductionJava Stdin and Stdout I5Solution.java
IntroductionJava If-Else10Solution.java
IntroductionJava Stdin and Stdout II10Solution.java
IntroductionJava Output Formatting10Solution.java
IntroductionJava Loops I10Solution.java
IntroductionJava Loops II10Solution.java
IntroductionJava Datatypes10Solution.java
IntroductionJava End-of-file10Solution.java
IntroductionJava Static Initializer Block10Solution.java
IntroductionJava Int to String10Solution.java
IntroductionJava Date and Time15Solution.java
IntroductionJava Currency Formatter15Solution.java
StringsJava Strings Introduction5Solution.java
StringsJava Substring5Solution.java
StringsJava String Compare10Solution.java
StringsJava String Reverse10Solution.java
StringsJava Anagrams10Solution.java
StringsJava String Tokens15Solution.java
StringsPattern Syntax Checker20Solution.java
StringsJava Regex25Solution.java
StringsJava Regex 2 - Duplicate Words25Solution.java
StringsJava Regex 3 - Username Checker20Solution.java
StringsTag Content Extractor20Solution.java
BigNumberJava BigInteger10Solution.java
BigNumberJava BigDecimal20Solution.java
BigNumberJava Primality Test20Solution.java
Data StructuresJava 1D Array5Solution.java
Data StructuresJava 2D Array10Solution.java
Data StructuresJava Subarray10Solution.java
Data StructuresJava Arraylist10Solution.java
Data StructuresJava 1D Array (Part 2)25Solution.java
Data StructuresJava List15Solution.java
Data StructuresJava Map10Solution.java
Data StructuresJava Stack20Solution.java
Data StructuresJava Hashset10Solution.java
Data StructuresJava Generics15Solution.java
Data StructuresJava Comparator10Solution.java
Data StructuresJava Sort10Solution.java
Data StructuresJava Dequeue20Solution.java
Data StructuresJava BitSet20Solution.java
Object Oriented ProgrammingJava Inheritance I5Solution.java
Object Oriented ProgrammingJava Inheritance II10Solution.java
Object Oriented ProgrammingJava Abstract Class10Solution.java
Object Oriented ProgrammingJava Interface10Solution.java
Object Oriented ProgrammingJava Method Overriding10Solution.java
Object Oriented ProgrammingJava Method Overriding 2 (Super Keyword)10Solution.java
Object Oriented ProgrammingJava Instanceof keyword10Solution.java
Object Oriented ProgrammingJava Iterator15Solution.java
Object Oriented ProgrammingCalculating Volume20Solution.java
Exception HandlingJava Exception Handling (Try-catch)10Solution.java
Exception HandlingJava Exception Handling15Solution.java
AdvancedJava Varargs - Simple Addition15Solution.java
AdvancedJava Reflection - Attributes15Solution.java
AdvancedCan You Access15Solution.java
AdvancedPrime Checker25Solution.java
AdvancedJava Factory Pattern15Solution.java
AdvancedJava Singleton Pattern15Solution.java
AdvancedJava Visitor Pattern40Solution.java
AdvancedJava Annotations25Solution.java
AdvancedCovariant Return Types20Solution.java
AdvancedJava Lambda Expressions30Solution.java
AdvancedJava MD530Solution.java
AdvancedJava SHA-25630Solution.java

SQL

SubdomainChallengePointsSolution
Basic SelectRevising the Select Query I10MySQL Solution
Basic SelectRevising the Select Query II10MySQL Solution
Basic SelectSelect All10MySQL Solution
Basic SelectSelect By ID10MySQL Solution
Basic SelectJapanese Cities' Attributes10MySQL Solution
Basic SelectJapanese Cities' Names10MySQL Solution
Basic SelectWeather Observation Station 115MySQL Solution
Basic SelectWeather Observation Station 310MySQL Solution
Basic SelectWeather Observation Station 410MySQL Solution
Basic SelectWeather Observation Station 530MySQL Solution
Basic SelectWeather Observation Station 610MySQL Solution
Basic SelectWeather Observation Station 710MySQL Solution
Basic SelectWeather Observation Station 815MySQL Solution
Basic SelectWeather Observation Station 910MySQL Solution
Basic SelectWeather Observation Station 1010MySQL Solution
Basic SelectWeather Observation Station 1115MySQL Solution
Basic SelectWeather Observation Station 1215MySQL Solution
Basic SelectHigher Than 75 Marks15MySQL Solution
Basic SelectEmployee Names10MySQL Solution
Basic SelectEmployee Salaries10MySQL Solution
Basic JoinAsian Population10MySQL Solution
Basic JoinAfrican Cities10MySQL Solution
Basic JoinAverage Population of Each Continent10MySQL Solution
Basic JoinThe Report20MySQL Solution
AggregationRevising Aggregations - The Count Function10MySQL Solution
AggregationRevising Aggregations - The Sum Function10MySQL Solution
AggregationRevising Aggregations - Averages10MySQL Solution
AggregationAverage Population10MySQL Solution
AggregationJapan Population10MySQL Solution
AggregationPopulation Density Difference10MySQL Solution
AggregationThe Blunder15MySQL Solution
AggregationTop Earners20MySQL Solution
AggregationWeather Observation Station 215MySQL Solution
AggregationWeather Observation Station 1310MySQL Solution
AggregationWeather Observation Station 1410MySQL Solution
AggregationWeather Observation Station 1515MySQL Solution
AggregationWeather Observation Station 1610MySQL Solution
AggregationWeather Observation Station 1715MySQL Solution
AggregationWeather Observation Station 1825MySQL Solution
AggregationWeather Observation Station 1930MySQL Solution