Home

Awesome

HackerRank Python 🐍 Domain Solutions

problems-solved cp

HackerRank is an online platform that offers programmers the ability to test their sills, practice and learn something new. The problem sets on HackerRank are divided in Domains & Tutorials, and the following are the domains & tutorials on HackerRank:

<details> <summary><b>Domains</b></summary> <ul> <li><a href="https://www.hackerrank.com/domains/algorithms">Algorithms</a></li> <li><a href="https://www.hackerrank.com/domains/data-structures">Data Structures</a></li> <li><a href="https://www.hackerrank.com/domains/mathematics">Mathematics</a></li> <li><a href="https://www.hackerrank.com/domains/c">C</a></li> <li><a href="https://www.hackerrank.com/domains/cpp">C++</a></li> <li><a href="https://www.hackerrank.com/domains/java">Java</a></li> <li><a href="https://www.hackerrank.com/domains/python">Python</a></li> <li><a href="https://www.hackerrank.com/domains/ruby">Ruby</a></li> <li><a href="https://www.hackerrank.com/domains/shell">Linux Shell</a></li> <li><a href="https://www.hackerrank.com/domains/fp">Functional Programming</a></li> <li><a href="https://www.hackerrank.com/domains/ai">Artificial Intelligence</a></li> <li><a href="https://www.hackerrank.com/domains/sql">SQL</a></li> <li><a href="https://www.hackerrank.com/domains/databases">Databases</a></li> <li><a href="https://www.hackerrank.com/domains/regex">Regex</a></li> </ul> </details> <details> <summary><b>Tutorials</b></summary> <ul> <li><a href="https://www.hackerrank.com/interview">Interview Preparation Kit</a></li> <li><a href="https://www.hackerrank.com/domains/tutorials/30-days-of-code">30 Days of Code</a></li> <li><a href="https://www.hackerrank.com/domains/tutorials/10-days-of-statistics">10 Days of Statistics</a></li> <li><a href="https://www.hackerrank.com/domains/tutorials/10-days-of-javascript">10 Days of JavaScript</a></li> </ul> </details>

This repository contains solutions to the Python domain part of HackerRank. My HackerRank profile can be viewed here.

I have also solved other domains on HackerRank that can be viewed at:

DomainSolutions Repository Link
AlgorithmsSolutions Repository
Data StructuresSolutions Repository
JavaSolutions Repository
Interview Preparation KitSolutions Repository

The Python Domain is further Divided into the following sub-domains.

Sub Domains & Problems (+Solutions) in the Python Domain

Quick Links ⚡ : Introduction | Basic Data Types | Strings | Sets | Math | Itertools | Collections | Data and Time | Errors and Exceptions | Classes | Built-Ins | Python Functionals | Regex and Parsing | XML | Closures and Decorators | NumPy | Debugging |

Introduction 👆

ProblemDifficultySolution Link
Say "Hello World" With PythonEasySolution
Python If-ElseEasySolution
Arithmetic OperatorsEasySolution
Python DivisionEasySolution
LoopsEasySolution
Write a FunctionMediumSolution
Print FunctionEasySolution

Basic Data Types 👆

ProblemDifficultySolution Link
List ComprehensionsEasySolution
Find the Runner-Up ScoreEasySolution
Nested ListsEasySolution
Finding The PercentageEasySolution
ListsEasySolution
TuplesEasySolution

Strings 👆

ProblemDifficultySolution Link
sWAP cASEEasySolution
String Split and JoinEasySolution
What's Your NameEasySolution
MutationsEasySolution
Find a StringEasySolution
String ValidatorsEasySolution
Text AlignmentEasySolution
Text WrapEasySolution
Designer Door MatEasySolution
String FormattingEasySolution
Alphabet RangoliEasySolution
Capatalize!EasySolution
The Minion GameMediumSolution
Merge The ToolsMediumSolution

Sets 👆

ProblemDifficultySolution Link
Introduction to SetsEasySolution
No Idea!MediumSolution
Symmetric DifferenceEasySolution
Set .add()EasySolution
Set .discard() .remove() & .pop()EasySolution
Set .union() OperationEasySolution
Set .intersection() OperationEasySolution
Set .difference() OperationEasySolution
Set .symmetric_difference() OperationEasySolution
Set MutationsEasySolution
Tha Captain's RoomEasySolution
Check SubsetEasySolution
Check Strict SupersetEasySolution

Math 👆

ProblemDifficultySolution Link
Polar CoordinatesEasySolution
Find Angle MBCMediumSolution
Triangle Quest 2MediumSolution
Mod DivmodEasySolution
Power - Mod PowerEasySolution
Integers Come in all sizesEasySolution
Triangle QuestEasySolution

Itertools 👆

ProblemDifficultySolution Link
itertools.product()EasySolution
itertools.permutations()EasySolution
itertools.combinations()EasySolution
itertools.combinations_with_replacement()EasySolution
Compress the String!MediumSolution
Iterables & IteratorsMediumSolution
Maximize It!HardSolution

Collections 👆

ProblemDifficultySolution Link
collections.Counter()EasySolution
DefaultDict TutorialEasySolution
Collections.namedTuple()EasySolution
Collections.orderedDict()EasySolution
Word OrderMediumSolution
Collections.dequeue()EasySolution
Company LogoMediumSolution
Piling Up!MediumSolution

Date and Time 👆

ProblemDifficultySolution Link
Calender ModuleEasySolution
Time DeltaMediumSolution

Errors and Exceptions 👆

ProblemDifficultySolution Link
ExceptionsEasySolution
Incorrect RegexEasySolution

Classes 👆

ProblemDifficultySolution Link
Class 2 - Find the Torsional AngleEasySolution
Classes: Dealing with Complex NumbersMediumSolution

Built Ins 👆

ProblemDifficultySolution Link
Zipped!EasySolution
Input()EasySolution
Python EvaluationEasySolution
Athlete SortMediumSolution
Any or AllEasySolution
ginortSMediumSolution

Python Functionals 👆

ProblemDifficultySolution Link
Map and Lambda FunctionEasySolution
Validating Email Address with FilterMediumSolution
Reduce FunctionMediumSolution

Regex and Parsing 👆

ProblemDifficultySolution Link
Detect Floating Point NumberEasySolution
Re.split()EasySolution
Group(), Groups() and Groupdict()EasySolution
Re.findall() & Re.finditer()EasySolution
Re.start() and Re.end()EasySolution
Regex SubstitutionMediumSolution
Validating Roman NumeralsEasySolution
Validating Phone NumbersEasySolution
Validating and Parsing Email AddressesEasySolution
Hex Color CodeEasySolution
HTML Parser - Part 1EasySolution
HTML Parser - Part 2EasySolution
Detect HTML Tags, Attributes and Attribute ValuesEasySolution
Validating UIDEasySolution
Validating Credit Card NumbersMediumSolution
Validating Postal CodesEasySolution
Matrix ScriptHardSolution

XML 👆

ProblemDifficultySolution Link
XML 1 - Find the ScoreEasySolution
XML 2 - Find the Maximum DepthEasySolution

Closures and Decorators 👆

ProblemDifficultySolution Link
Standardize Mobile Numbers Using DecoratorsEasySolution
Decorators 2 - Name DirectoryEasySolution

Numpy 👆

ProblemDifficultySolution Link
ArraysEasySolution
Shape and ReshapeEasySolution
Transpose and FlattenEasySolution
ConcatenateEasySolution
Zeroes and OnesEasySolution
Eye and IdentityEasySolution
Array MathematicsEasySolution
Floor, Ciel and RintEasySolution
Sum and ProdEasySolution
Min and MaxEasySolution
Mean, var and StdEasySolution
Dot and CrossEasySolution
Inner and OuterEasySolution
PolynomialsEasySolution
Linear AlgebraEasySolution

Debugging 👆

ProblemDifficultySolution Link
Word ScoreMediumSolution
Default ArgumentsMediumSolution