Solutions of the HackerRank's Python challenges
- Introduction
Challenge | Solution |
---|---|
Say "Hello, World!" With Python | Script |
Python If-Else | Script |
Arithmetic Operators | Script |
Python: Division | Script |
Loops | [Script] () |
Write a function | [Script] () |
Print Function | Script |
- Basic Data Types
Challenge | Solution |
---|---|
List Comprehensions | [Script] () |
Find the Runner-Up Score! | [Script] () |
Nested Lists | [Script] () |
Finding the percentage | [Script] () |
Lists | [Script] () |
Tuples | [Script] () |
- Strings
Challenge | Solution |
---|---|
sWAP cASE | [Script] () |
String Split and Join | [Script] () |
What's Your Name? | [Script] () |
Mutations | [Script] () |
Find a string | [Script] () |
String Validators | [Script] () |
Text Alignment | [Script] () |
Text Wrap | [Script] () |
Designer Door Mat | [Script] () |
String Formatting | [Script] () |
Alphabet Rangoli | [Script] () |
Capitalize! | [Script] () |
The Minion Game | [Script] () |
Merge the Tools! | [Script] () |
- Sets
Challenge | Solution |
---|---|
Introduction to Sets | [Script] () |
No Idea! | [Script] () |
Symmetric Difference | [Script] () |
Set .add() | [Script] () |
Set .discard(), .remove() & .pop() | [Script] () |
Set .union() Operation | [Script] () |
Set .intersection() Operation | [Script] () |
Set .difference() Operation | [Script] () |
Set .symmetric_difference() Operation | [Script] () |
Set Mutations | [Script] () |
The Captain's Room | [Script] () |
Check Subset | [Script] () |
Check Strict Superset | [Script] () |
- Math
Challenge | Solution |
---|---|
Polar Coordinates | [Script] () |
Find Angle MBC | [Script] () |
Triangle Quest 2 | [Script] () |
Mod Divmod | [Script] () |
Power - Mod Power | [Script] () |
Integers Come In All Sizes | [Script] () |
Triangle Quest | [Script] () |
- Itertools
Challenge | Solution |
---|---|
itertools.product() | [Script] () |
itertools.permutations() | [Script] () |
itertools.combinations() | [Script] () |
itertools.combinations_with_replacement() | [Script] () |
Compress the String! | [Script] () |
Iterables and Iterators | [Script] () |
Maximize It! | [Script] () |
- Collections
Challenge | Solution |
---|---|
collections.Counter() | [Script] () |
DefaultDict Tutorial | [Script] () |
Collections.namedtuple() | [Script] () |
Collections.OrderedDict() | [Script] () |
Word Order | [Script] () |
Collections.deque() | [Script] () |
Company Logo | [Script] () |
Piling Up! | [Script] () |
- Date and Time
Challenge | Solution |
---|---|
Calendar Module | [Script] () |
Time Delta | [Script] () |
- Errors and Exceptions
Challenge | Solution |
---|---|
Exceptions | [Script] () |
Incorrect Regex | [Script] () |
- Classes
Challenge | Solution |
---|---|
Classes: Dealing with Complex Numbers | [Script] () |
Class 2 - Find the Torsional Angle | [Script] () |
- Built-Ins
Challenge | Solution |
---|---|
Zipped! | [Script] () |
Input() | [Script] () |
Python Evaluation | [Script] () |
Athlete Sort | [Script] () |
Any or All | [Script] () |
ginortS | [Script] () |
- Python Functionals
Challenge | Solution |
---|---|
Map and Lambda Function | [Script] () |
Validating Email Addresses With a Filter | [Script] () |
Reduce Function | [Script] () |
- Regex and Parsing
Challenge | Solution |
---|---|
Detect Floating Point Number | [Script] () |
Re.split() | [Script] () |
Group(), Groups() & Groupdict() | [Script] () |
Re.findall() & Re.finditer() | [Script] () |
Re.start() & Re.end() | [Script] () |
Regex Substitution | [Script] () |
Validating Roman Numerals | [Script] () |
Validating phone numbers | [Script] () |
Validating and Parsing Email Addresses | [Script] () |
Hex Color Code | [Script] () |
HTML Parser - Part 1 | [Script] () |
HTML Parser - Part 2 | [Script] () |
Detect HTML Tags, Attributes and Attribute Values | [Script] () |
Validating UID | [Script] () |
Validating Credit Card Numbers | [Script] () |
Validating Postal Codes | [Script] () |
Matrix Script | [Script] () |
- XML
Challenge | Solution |
---|---|
XML 1 - Find the Score | [Script] () |
XML2 - Find the Maximum Depth | [Script] () |
- Closures and Decorators
Challenge | Solution |
---|---|
Standardize Mobile Number Using Decorators | [Script] () |
Decorators 2 - Name Directory | [Script] () |
- Numpy
Challenge | Solution |
---|---|
Arrays | [Script] () |
Shape and Reshape | [Script] () |
Transpose and Flatten | [Script] () |
Concatenate | [Script] () |
Zeros and Ones | [Script] () |
Eye and Identity | [Script] () |
Array Mathematics | [Script] () |
Floor, Ceil and Rint | [Script] () |
Sum and Prod | [Script] () |
Min and Max | [Script] () |
Mean, Var, and Std | [Script] () |
Dot and Cross | [Script] () |
Inner and Outer | [Script] () |
Polynomials | [Script] () |
Linear Algebra | [Script] () |
- Debugging
Challenge | Solution |
---|---|
Words Score | [Script] () |
Default Arguments | [Script] () |