Skip to content

MarlonSomwaru/HackerRank

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 

Repository files navigation

HackerRank Logo

This repository contains solutions to the problems found on HackerRank.

Check out my HackerRank profile here

Problem Solving

Algorithms

Warmup

Challenge Solution
Solve Me First Solve Me First.py
Simple Array Sum Simple Array Sum.py
Compare the Triplets Compare Triplets.py
A Very Big Sum Big Sum.py
Plus Minus Plus Minus.py
Staircase Staircase.py
Mini-Max Sum Mini Max Sum.py
Birthday Cakes Candles
Time Conversion Time Conversion.py
Diagonal Difference
Compare Triplets Compare Triplets.py

Implementation

Challenge Solution
Sales by Match Sales by Match.py
Cats and a Mouse Cats and a Mouse.py

Strings

Challenge Solution
CamelCase CamelCase.py
Pangrams Pangrams.py
Funny String Funny String.py
Alternating Characters Alternating Characters.py

Sorting

Challenge Solution

Search

Challenge Solution

Graph Theory

Challenge Solution

Greedy

Challenge Solution

Dynamic Programming

Challenge Solution

Constructive Algorithms

Challenge Solution

Bit Manipulation

Challenge Solution

Recursion

Challenge Solution

Game Theory

Challenge Solution

NP Complete

Challenge Solution

Debugging

Challenge Solution

Data Structures

Arrays

Challenge Solution

Linked Lists

Challenge Solution

Trees

Challenge Solution

Balanced Trees

Challenge Solution

Stacks

Challenge Solution

Queues

Challenge Solution

Heap

Challenge Solution

Disjoint Set

Challenge Solution

Multiple Choice

Challenge Solution

Trie

Challenge Solution

Advanced

Challenge Solution

Python

Introduction

Challenge Solution
Say "Hello, World!" with Python Say Hello World With Python.py
Python If-Else If-Else.py
Arithmetic Operators Arithmetic Operators.py
Python: Division Division.py
Loops Loops.py
Write a function Write a function.py
Print Function Print Function.py

Basic Data Types

Challenge Solution
List Comprehensions List Comprehensions.py
Find the Runner-Up Score! Find the Runner-Up Score.py
Nested Lists Nested Lists.py
Finding the Percentage Finding the Percentage.py
Lists Lists.py
Tuples Tuples.py

Strings

Challenge Solution
sWAP cASE
String Split Join String Split Join.py
What's Your Name What's Your Name.py
Mutations
String Validators
Text Alignment
Text Wrap Text Wrap.py
Designer Door Mat
String Formatting
Alphabet Rangoli
Capitalize
The Minion Game
Merge the Tools!

Sets

Challenge Solution
Introduciton to Sets Introduction to Sets.py
No Idea No Idea.py
Symmetric Difference Symmetric Difference.py
Set .add() Set .add().py
Set .discard(), .remove() & .pop() Set .discard(), .remove() .pop().py
Set .union() Operation Set .union() Operation.py
Set .intersection() Operation Set .intersection() Operation.py
Set .difference() Operation Set .difference() Operation.py
Set .symmetric_difference() Operation Set .symmetric_difference() Operation.py
Set Mutations Set Mutations.py
Check Subset
Check Strict Superset
The Captain's Room

Math

Challenge Solution
Polar Coordinates
Find Angle MBC
Triangle Quest
Triangle Quest 2
Mod Divmod Mod Divmod.py
Power - Mod Power Power-Mod Power.py
Integers Come In All Sizes Integers All Sizes.py

Itertools

Challenge Solution
itertools.product()
itertools.permutations()
itertools.combinations()
itertools.combinations_with_replacement()
Compress the String!
Iterables and Iterators
Maximize It!

Collections

Challenge Solution
collections.Counter()
DefaultDict Tutorial
Collections.nametuple()
Collections.OrderDict()
Word Order
Collections.deque()
Company Logo
Piling Up!

Date and Time

Challenge Solution
Calendar Module Calendar Module.py
Time Delta

Errors and Exceptions

Challenge Solution
Exceptions Exceptions.py
Incorrect Regex

Classes

Challenge Solution
Classes: Dealing with Complex Numbers
Class 2 - Find the Torsional Angle

Built-Ins

Challenge Solution
Input()
Python Evaluation Evaluation.py
Athlete Sort
Any or All Any or All.py
ginortS

Python Functionals

Challenge Solution
Map and Lambda Function
Validating Email Addresses With a Filter
Reduce Function

Regex and Parsing

Challenge Solution
Detect Floating Point Number
Re.split()
Group(), Groups() & Groupdict()
Re.findall() & Re.finditer()
Re.start() & Re.end()
Regex Substitution
Validating Roman Numerals
Validating phone numbers
Validating and Parsing Email Addresses
Hex Color Code
HTML Parser - Part 1
HTML Parser - Part 2
Detecting HTML Tags, Attribites and Attribute Values
Validating UID
Validating Credit Card Numbers
Validating Postal Codes
Matrix Script

XML

Challenge Solution
XML 1 - Find the Score
XML 2 - Find the Maximum Depth

Closures and Decorators

Challenge Solution
Standardize Mobile Number Using Decorators
Decorators 2 - Name Directory

Numpy

Challenge Solution
Arrays
Transpose and Flatten
Shape and Reshape
Concatenate
Zeros and Ones
Eye and Identity
Array Mathematics
Floor, Ceil, Rint
Sum and Prod
Min and Max
Mean, Var, and Std
Dot and Cross
Inner and Outer
Polynomials
Linear Algebra

Debugging

Challenge Solution
Words Scores
Default Arguments

SQL

Basic Select

Challenge Solution
Revising the Select Query 1 Revising the Select Query 1.sql
Revising the Select Query 2 Revising the Select Query 2.sql
Select All Select All.sql
Select By ID Select By ID.sql
Japanese Cities' Attributes Japanese Cities' Attributes.sql
Japanese Cities' Names Japanese Cities' Names.sql
Weather Observation 1 Weather Observation 1.sql
Weather Observation 3 Weather Observation 3.sql
Weather Observation 4 Weather Observation 4.sql
Weather Observation 5 Weather Observation 5.sql
Weather Observation 6 Weather Observation 6.sql
Weather Observation 7 Weather Observation 7.sql
Weather Observation 8 Weather Observation 8.sql
Weather Observation 9 Weather Observation 9.sql
Weather Observation 10 Weather Observation 10.sql
Weather Observation 11 Weather Observation 11.sql
Weather Observation 12 Weather Observation 12.sql
Higher Than 75 Marks Higher Than 75 Marks.sql
Employee Names Employee Names.sql
Employee Salaries Employee Salaries.sql

Advanced Select

Challenge Solution
Type of Triangle
Occupations
Binary Tree Nodes
New Companies
The PADS

Aggregation

Challenge Solution
Revising Aggregations-The Count Function
Revising Aggregations-The Sum Function
Revising Aggregations-Averages
Average Population
Japan Population
Population Density Difference
The Blunder
Top Earners
Weather Observation 2
Weather Observation 13
Weather Observation 14
Weather Observation 15
Weather Observation 16
Weather Observation 17
Weather Observation 18
Weather Observation 19
Weather Observation 20

Basic Join

Challenge Solution
Asian Population
African Cities
Average Population of Each Continent
Top Competitors
The Report
Ollivander's Inventory
Challenges
Contest Leader

Advanced Join

Challenge Solution
Projects
Placements
Symmetric Pairs
Interviews
15 Days of Learning SQL

Alternative Queries

Challenge Solution
Draw The Triangle 1 Draw The Triangle 1.sql
Draw The Triangle 2 Draw The Triangle 2.sql
Print Prime Numbers Print Prime Numbers.sql