Skip to content

srgnk/HackerRank

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HackerRank

Solutions to HackerRank problems

Algorithms

Subdomain Difficulty Challenge Solution
Warmup Easy Solve Me First solve-me-first.py
Warmup Easy Simple Array Sum simple-array-sum.py
Warmup Easy Compare the Triplets compare-the-triplets.py
Warmup Easy A Very Big Sum a-very-big-sum.py
Warmup Easy Diagonal Difference diagonal-difference.py
Warmup Easy Plus Minus plus-minus.py
Warmup Easy Staircase staircase.py
Warmup Easy Mini-Max Sum mini-max-sum.py
Warmup Easy Birthday Cake Candles birthday-cake-candles.py
Warmup Easy Time Conversion time-conversion.py
Implementation Easy Grading Students grading.py
Implementation Easy Apple and Orange apple-and-orange.py
Implementation Easy Kangaroo kangaroo.py
Implementation Easy Between Two Sets between-two-sets.py
Implementation Easy Breaking the Records breaking-best-and-worst-records.py
Implementation Easy Birthday Chocolate the-birthday-bar.py
Implementation Easy Divisible Sum Pairs divisible-sum-pairs.py
Implementation Easy Migratory Birds migratory-birds.py
Implementation Easy Day of the Programmer day-of-the-programmer.py
Implementation Easy Bon Appétit bon-appetit.py
Implementation Easy Sock Merchant sock-merchant.py
Implementation Easy Drawing Book drawing-book.py
Implementation Easy Counting Valleys counting-valleys.py
Implementation Easy Electronics Shop electronics-shop.py
Implementation Easy Cats and a Mouse cats-and-a-mouse.py
Implementation Easy Picking Numbers picking-numbers.py
Implementation Easy The Hurdle Race the-hurdle-race.py
Implementation Easy Designer PDF Viewer designer-pdf-viewer.py
Implementation Easy Utopian Tree utopian-tree.py
Implementation Easy Angry Professor angry-professor.py
Implementation Easy Beautiful Days at the Movies beautiful-days-at-the-movies.py
Implementation Easy Viral Advertising strange-advertising.py
Implementation Easy Save the Prisoner! save-the-prisoner.py
Implementation Easy Circular Array Rotation circular-array-rotation.py
Implementation Easy Sequence Equation permutation-equation.py
Implementation Easy Jumping on the Clouds: Revisited jumping-on-the-clouds-revisited.py
Implementation Easy Find Digits find-digits.py
Implementation Easy Append and Delete append-and-delete.py
Implementation Easy Sherlock and Squares sherlock-and-squares.py
Implementation Easy Library Fine library-fine.py
Implementation Easy Cut the sticks cut-the-sticks.py
Implementation Easy Repeated String repeated-string.py
Implementation Easy Jumping on the Clouds jumping-on-the-clouds.py
Implementation Easy Equalize the Array equality-in-a-array.py
Implementation Easy ACM ICPC Team acm-icpc-team.py
Implementation Easy Taum and B'day taum-and-bday.py
Implementation Easy Modified Kaprekar Numbers kaprekar-numbers.py
Implementation Easy Beautiful Triplets beautiful-triplets.py
Implementation Easy Minimum Distances minimum-distances.py
Implementation Easy Chocolate Feast chocolate-feast.py
Implementation Easy Service Lane service-lane.py
Implementation Easy Lisa's Workbook lisa-workbook.py
Implementation Easy Flatland Space Stations flatland-space-stations.py
Implementation Easy Fair Rations fair-rations.py
Implementation Easy Cavity Map cavity-map.py
Implementation Easy Manasa and Stones manasa-and-stones.py
Implementation Easy Happy Ladybugs happy-ladybugs.py
Implementation Easy Strange Counter strange-code.py
Implementation Easy Halloween Sale halloween-sale.py
Implementation Medium Forming a Magic Square magic-square-forming.py
Implementation Medium Climbing the Leaderboard climbing-the-leaderboard.py
Implementation Medium Extra Long Factorials extra-long-factorials.py
Implementation Medium Non-Divisible Subset non-divisible-subset.py
Implementation Medium Queen's Attack II queens-attack-2.py
Implementation Medium Encryption encryption.py
Implementation Medium Bigger is Greater bigger-is-greater.py
Implementation Medium The Time in Words the-time-in-words.py
Implementation Medium The Grid Search the-grid-search.py
Implementation Medium 3D Surface Area 3d-surface-area.py
Implementation Medium Absolute Permutation absolute-permutation.py
Implementation Medium Ema's Supercomputer two-pluses.py
Implementation Medium Larry's Array larrys-array.py
Implementation Medium Almost Sorted almost-sorted.py
Sorting Easy Big Sorting big-sorting.py
Strings Easy Super Reduced String reduced-string.py
Strings Easy CamelCase camelcase.py
Strings Easy Two Characters two-characters.py
Strings Easy Caesar Cipher caesar-cipher-1.py
Strings Easy Mars Exploration mars-exploration.py
Strings Easy HackerRank in a String! hackerrank-in-a-string.py
Strings Easy Pangrams pangrams.py
Strings Easy Weighted Uniform Strings weighted-uniform-string.py
Strings Easy Separate the Numbers separate-the-numbers.py
Strings Easy Funny String funny-string.py
Strings Easy Gemstones gem-stones.py
Strings Easy Alternating Characters alternating-characters.py
Strings Easy Beautiful Binary String beautiful-binary-string.py
Strings Easy The Love-Letter Mystery the-love-letter-mystery.py
Strings Easy Palindrome Index palindrome-index.py
Strings Easy Anagram anagram.py
Strings Easy Making Anagrams making-anagrams.py
Strings Easy Game of Thrones - I game-of-thrones.py
Strings Easy Two Strings two-strings.py
Strings Easy String Construction string-construction.py
Strings Easy Strong Password strong-password.py
Strings Medium Sherlock and Anagrams sherlock-and-anagrams.py
Strings Medium Sherlock and the Valid String sherlock-and-valid-string.py
Strings Medium Common Child common-child.py
Sorting Easy Intro to Tutorial Challenges tutorial-intro.py
Sorting Easy Insertion Sort - Part 1 insertionsort1.py
Sorting Easy Insertion Sort - Part 2 insertionsort2.py
Sorting Easy Correctness and the Loop Invariant correctness-invariant.py
Sorting Easy Running Time of Algorithms runningtime.py
Sorting Easy Quicksort 1 - Partition quicksort1.py
Sorting Easy Counting Sort 1 countingsort1.py
Sorting Easy Counting Sort 2 countingsort2.py
Sorting Easy Closest Numbers closest-numbers.py
Sorting Easy Find the Median find-the-median.py
Sorting Medium The Full Counting Sort countingsort4.py
Search Easy Ice Cream Parlor icecream-parlor.py
Search Easy Missing Numbers missing-numbers.py
Search Easy Sherlock and Array sherlock-and-array.py
Search Medium KnightL on a Chessboard knightl-on-chessboard.py
Search Medium Connected Cells in a Grid connected-cell-in-a-grid.py
Search Medium Pairs pairs.py
Graph Theory Hard Dijkstra: Shortest Reach 2 dijkstrashortreach.py
Greedy Easy Minimum Absolute Difference in an Array minimum-absolute-difference-in-an-array.py
Greedy Easy Marc's Cakewalk marcs-cakewalk.py
Greedy Easy Grid Challenge grid-challenge.py
Greedy Easy Luck Balance luck-balance.py
Greedy Easy Maximum Perimeter Triangle maximum-perimeter-triangle.py
Greedy Easy Beautiful Pairs beautiful-pairs.py
Greedy Easy Sherlock and The Beast sherlock-and-the-beast.py
Greedy Easy Priyanka and Toys priyanka-and-toys.py
Greedy Easy Largest Permutation largest-permutation.py
Greedy Easy Mark and Toys mark-and-toys.py
Greedy Easy Jim and the Orders jim-and-the-orders.py
Greedy Easy Permuting Two Arrays two-arrays.py
Greedy Medium Max Min angry-children.py
Dynamic Programming Medium The Coin Change Problem coin-change.py
Dynamic Programming Medium Equal equal.py
Bit Manipulation Easy Lonely Integer lonely-integer.py
Bit Manipulation Easy Maximizing XOR maximizing-xor.py
Bit Manipulation Easy Sum vs XOR sum-vs-xor.py
Bit Manipulation Easy Flipping bits flipping-bits.py
Bit Manipulation Medium Counter game counter-game.py
Bit Manipulation Medium Xor-sequence xor-se.py
Bit Manipulation Medium The Great XOR the-great-xor.py
Bit Manipulation Medium Yet Another Minimax Problem yet-another-minimax-problem.py
Bit Manipulation Medium Sansa and XOR sansa-and-xor.py
Bit Manipulation Medium AND Product and-product.py
Bit Manipulation Medium Cipher cipher.py
Recursion Medium The Power Sum the-power-sum.py
Recursion Medium Recursive Digit Sum recursive-digit-sum.py
Recursion Medium Password Cracker password-cracker.py
Recursion Hard K Factorization k-factorization.py
Recursion Advanced Repetitive K-Sums repeat-k-sums.py
Game Theory Easy Game of Stones game-of-stones-1.py
Game Theory Easy Tower Breakers tower-breakers-1.py
Game Theory Easy A Chessboard Game a-chessboard-game-1.py
Game Theory Easy Introduction to Nim Game nim-game-1.py
Game Theory Easy Misère Nim misere-nim-1.py
Game Theory Easy Poker Nim poker-nim-1.py
Game Theory Easy Nimble Game nimble-game-1.py

Data Structures

Subdomain Difficulty Challenge Solution
Arrays Easy Arrays - DS arrays-ds.py
Arrays Easy 2D Array - DS 2d-array.py
Arrays Easy Dynamic Array dynamic-array.py
Arrays Easy Left Rotation array-left-rotation.py
Arrays Medium Sparse Arrays sparse-arrays.py
Arrays Hard Array Manipulation crush.py
Linked Lists Easy Print the Elements of a Linked List print-the-elements-of-a-linked-list.py
Linked Lists Easy Insert a Node at the Tail of a Linked List insert-a-node-at-the-tail-of-a-linked-list.py
Linked Lists Easy Insert a node at the head of a linked list insert-a-node-at-the-head-of-a-linked-list.py
Linked Lists Easy Insert a node at a specific position in a linked list insert-a-node-at-a-specific-position-in-a-linked-list.py
Linked Lists Easy Delete a Node delete-a-node-from-a-linked-list.py
Linked Lists Easy Print in Reverse print-the-elements-of-a-linked-list-in-reverse.py
Linked Lists Easy Reverse a linked list reverse-a-linked-list.py
Linked Lists Easy Compare two linked lists compare-two-linked-lists.py
Linked Lists Easy Merge two sorted linked lists merge-two-sorted-linked-lists.py
Linked Lists Easy Get Node Value get-the-value-of-the-node-at-a-specific-position-from-the-tail.py
Linked Lists Easy Delete duplicate-value nodes from a sorted linked list delete-duplicate-value-nodes-from-a-sorted-linked-list.py
Linked Lists Easy Find Merge Point of Two Lists find-the-merge-point-of-two-joined-linked-lists.py
Linked Lists Easy Inserting a Node Into a Sorted Doubly Linked List insert-a-node-into-a-sorted-doubly-linked-list.py
Linked Lists Easy Reverse a doubly linked list reverse-a-doubly-linked-list.py
Linked Lists Medium Cycle Detection detect-whether-a-linked-list-contains-a-cycle.py
Trees Easy Tree: Preorder Traversal tree-preorder-traversal.py
Trees Easy Tree: Postorder Traversal tree-postorder-traversal.py
Trees Easy Tree: Inorder Traversal tree-inorder-traversal.py
Trees Easy Tree: Height of a Binary Tree tree-height-of-a-binary-tree.py
Trees Easy Tree : Top View tree-top-view.py
Trees Easy Tree: Level Order Traversal tree-level-order-traversal.py
Trees Easy Binary Search Tree : Insertion binary-search-tree-insertion.py
Trees Easy Binary Search Tree : Lowest Common Ancestor binary-search-tree-lowest-common-ancestor.py
Trees Medium Tree: Huffman Decoding tree-huffman-decoding.py
Trees Medium Swap Nodes [Algo] swap-nodes-algo.py
Trees Medium Is This a Binary Search Tree? is-binary-search-tree.py
Balanced Trees Medium Self Balancing Tree self-balancing-tree.c
Balanced Trees Hard Median Updates median.py
Stacks Easy Maximum Element maximum-element.py
Stacks Easy Equal Stacks equal-stacks.py
Stacks Medium Balanced Brackets balanced-brackets.py
Stacks Medium Game of Two Stacks game-of-two-stacks.py
Stacks Medium Largest Rectangle largest-rectangle.py
Stacks Medium Simple Text Editor simple-text-editor.py
Stacks Medium Waiter waiter.py
Stacks Hard Poisonous Plants poisonous-plants.py
Stacks Hard AND xor OR and-xor-or.py
Queues Medium Queue using Two Stacks queue-using-two-stacks.py
Queues Medium Castle on the Grid castle-on-the-grid.py
Queues Medium Down to Zero II down-to-zero-ii.py
Queues Hard Truck Tour truck-tour.py
Queues Hard Queries with Fixed Length queries-with-fixed-length.py
Heap Easy QHEAP1 qheap1.py
Heap Easy Jesse and Cookies jesse-and-cookies.py
Heap Hard Find the Running Median find-the-running-median.py
Heap Hard Minimum Average Waiting Time minimum-average-waiting-time.py
Disjoint Set Medium Components in a graph components-in-graph.py
Disjoint Set Hard Merging Communities merging-communities.py
Disjoint Set Hard Super Maximum Cost Queries maximum-cost-queries.py
Multiple Choice Hard Data Structures MCQ 1 how-well-do-you-know-trees.py
Multiple Choice Hard Data Structures MCQ 2 are-you-an-expert-on-data-structures.py
Multiple Choice Hard Data Structures MCQ 3 are-you-an-expert-on-data-structures-1.py
Trie Medium Contacts contacts.py
Trie Hard No Prefix Set no-prefix-set.py
Advanced Medium Mr. X and His Shots x-and-his-shots.py
Advanced Medium Jim and the Skyscrapers jim-and-the-skyscrapers.py
Advanced Medium Find Maximum Index Product find-maximum-index-product.py

Python

Subdomain Difficulty Challenge Solution
Introduction Easy Say "Hello, World!" With Python py-hello-world.py
Introduction Easy Python If-Else py-if-else.py
Introduction Easy Arithmetic Operators python-arithmetic-operators.py
Introduction Easy Python: Division python-division.py
Introduction Easy Loops python-loops.py
Introduction Easy Print Function python-print.py
Introduction Medium Write a function write-a-function.py
Basic Data Types Easy List Comprehensions list-comprehensions.py
Basic Data Types Easy Find the Runner-Up Score! find-second-maximum-number-in-a-list.py
Basic Data Types Easy Nested Lists nested-list.py
Basic Data Types Easy Finding the percentage finding-the-percentage.py
Basic Data Types Easy Lists python-lists.py
Basic Data Types Easy Tuples python-tuples.py
Strings Easy sWAP cASE swap-case.py
Strings Easy String Split and Join python-string-split-and-join.py
Strings Easy What's Your Name? whats-your-name.py
Strings Easy Mutations python-mutations.py
Strings Easy Find a string find-a-string.py
Strings Easy String Validators string-validators.py
Strings Easy Text Alignment text-alignment.py
Strings Easy Text Wrap text-wrap.py
Strings Easy Designer Door Mat designer-door-mat.py
Strings Easy String Formatting python-string-formatting.py
Strings Easy Alphabet Rangoli alphabet-rangoli.py
Strings Easy Capitalize! capitalize.py
Strings Medium The Minion Game the-minion-game.py
Strings Medium Merge the Tools! merge-the-tools.py
Sets Easy Introduction to Sets py-introduction-to-sets.py
Sets Easy Symmetric Difference symmetric-difference.py
Sets Easy Set .add() py-set-add.py
Sets Easy Set .discard(), .remove() & .pop() py-set-discard-remove-pop.py
Sets Easy Set .union() Operation py-set-union.py
Sets Easy Set .intersection() Operation py-set-intersection-operation.py
Sets Easy Set .difference() Operation py-set-difference-operation.py
Sets Easy Set .symmetric_difference() Operation py-set-symmetric-difference-operation.py
Sets Easy Set Mutations py-set-mutations.py
Sets Easy The Captain's Room py-the-captains-room.py
Sets Easy Check Subset py-check-subset.py
Sets Easy Check Strict Superset py-check-strict-superset.py
Sets Medium No Idea! no-idea.py
Math Easy Polar Coordinates polar-coordinates.py
Math Easy Mod Divmod python-mod-divmod.py
Math Easy Power - Mod Power python-power-mod-power.py
Math Easy Integers Come In All Sizes python-integers-come-in-all-sizes.py
Math Medium Find Angle MBC find-angle.py
Math Medium Triangle Quest 2 triangle-quest-2.py
Math Medium Triangle Quest python-quest-1.py
Itertools Easy itertools.product() itertools-product.py
Itertools Easy itertools.permutations() itertools-permutations.py
Itertools Easy itertools.combinations() itertools-combinations.py
Itertools Easy itertools.combinations_with_replacement() itertools-combinations-with-replacement.py
Itertools Medium Compress the String! compress-the-string.py
Itertools Medium Iterables and Iterators iterables-and-iterators.py
Itertools Hard Maximize It! maximize-it.py
Collections Easy collections.Counter() collections-counter.py
Collections Easy DefaultDict Tutorial defaultdict-tutorial.py
Collections Easy Collections.namedtuple() py-collections-namedtuple.py
Collections Easy Collections.OrderedDict() py-collections-ordereddict.py
Collections Easy Collections.deque() py-collections-deque.py
Collections Medium Word Order word-order.py
Collections Medium Company Logo most-commons.py
Collections Medium Piling Up! piling-up.py
Date and Time Easy Calendar Module calendar-module.py
Date and Time Medium Time Delta python-time-delta.py
Errors and Exceptions Easy Exceptions exceptions.py
Errors and Exceptions Easy Incorrect Regex incorrect-regex.py
Classes Easy Class 2 - Find the Torsional Angle class-2-find-the-torsional-angle.py
Classes Medium Classes: Dealing with Complex Numbers class-1-dealing-with-complex-numbers.py
Built-Ins Easy Zipped! zipped.py
Built-Ins Easy Input() input.py
Built-Ins Easy Python Evaluation python-eval.py
Built-Ins Easy Any or All any-or-all.py
Built-Ins Medium Athlete Sort python-sort-sort.py
Built-Ins Medium ginortS ginorts.py
Python Functionals Easy Map and Lambda Function map-and-lambda-expression.py
Python Functionals Medium Validating Email Addresses With a Filter validate-list-of-email-address-with-filter.py
Python Functionals Medium Reduce Function reduce-function.py
Regex and Parsing Easy Detect Floating Point Number introduction-to-regex.py
Regex and Parsing Easy Re.split() re-split.py
Regex and Parsing Easy Group(), Groups() & Groupdict() re-group-groups.py
Regex and Parsing Easy Re.findall() & Re.finditer() re-findall-re-finditer.py
Regex and Parsing Easy Re.start() & Re.end() re-start-re-end.py
Regex and Parsing Easy Validating Roman Numerals validate-a-roman-number.py
Regex and Parsing Easy Validating phone numbers validating-the-phone-number.py
Regex and Parsing Easy Validating and Parsing Email Addresses validating-named-email-addresses.py
Regex and Parsing Easy Hex Color Code hex-color-code.py
Regex and Parsing Easy HTML Parser - Part 1 html-parser-part-1.py
Regex and Parsing Easy HTML Parser - Part 2 html-parser-part-2.py
Regex and Parsing Easy Detect HTML Tags, Attributes and Attribute Values detect-html-tags-attributes-and-attribute-values.py
Regex and Parsing Easy Validating UID validating-uid.py
Regex and Parsing Medium Regex Substitution re-sub-regex-substitution.py
Regex and Parsing Medium Validating Credit Card Numbers validating-credit-card-number.py
Regex and Parsing Hard Validating Postal Codes validating-postalcode.py
Regex and Parsing Hard Matrix Script matrix-script.py
XML Easy XML 1 - Find the Score xml-1-find-the-score.py
XML Easy XML2 - Find the Maximum Depth xml2-find-the-maximum-depth.py
Closures and Decorators Easy Standardize Mobile Number Using Decorators standardize-mobile-number-using-decorators.py
Closures and Decorators Easy Decorators 2 - Name Directory decorators-2-name-directory.py
Numpy Easy Arrays np-arrays.py
Numpy Easy Shape and Reshape np-shape-reshape.py
Numpy Easy Transpose and Flatten np-transpose-and-flatten.py
Numpy Easy Concatenate np-concatenate.py
Numpy Easy Zeros and Ones np-zeros-and-ones.py
Numpy Easy Eye and Identity np-eye-and-identity.py
Numpy Easy Array Mathematics np-array-mathematics.py
Numpy Easy Floor, Ceil and Rint floor-ceil-and-rint.py
Numpy Easy Sum and Prod np-sum-and-prod.py
Numpy Easy Min and Max np-min-and-max.py
Numpy Easy Mean, Var, and Std np-mean-var-and-std.py
Numpy Easy Dot and Cross np-dot-and-cross.py
Numpy Easy Inner and Outer np-inner-and-outer.py
Numpy Easy Polynomials np-polynomials.py
Numpy Easy Linear Algebra np-linear-algebra.py
Debugging Medium Words Score words-score.py
Debugging Medium Default Arguments default-arguments.py

Linux Shell

Subdomain Difficulty Challenge Solution
Bash Easy Let's Echo bash-tutorials-lets-echo.sh
Bash Easy Looping and Skipping bash-tutorials---looping-and-skipping.sh
Bash Easy A Personalized Echo bash-tutorials---a-personalized-echo.sh
Bash Easy Looping with Numbers bash-tutorials---looping-with-numbers.sh
Bash Easy The World of Numbers bash-tutorials---the-world-of-numbers.sh
Bash Easy Comparing Numbers bash-tutorials---comparing-numbers.sh
Bash Easy Getting started with conditionals bash-tutorials---getting-started-with-conditionals.sh
Bash Easy More on Conditionals bash-tutorials---more-on-conditionals.sh
Bash Medium Arithmetic Operations bash-tutorials---arithmetic-operations.sh
Bash Medium Compute the Average bash-tutorials---compute-the-average.sh
Bash Hard Functions and Fractals - Recursive Trees - Bash! fractal-trees-all.sh
Text Processing Easy Cut #1 text-processing-cut-1.sh
Text Processing Easy Cut #2 text-processing-cut-2.sh
Text Processing Easy Cut #3 text-processing-cut-3.sh
Text Processing Easy Cut #4 text-processing-cut-4.sh
Text Processing Easy Cut #5 text-processing-cut-5.sh
Text Processing Easy Cut #6 text-processing-cut-6.sh
Text Processing Easy Cut #7 text-processing-cut-7.sh
Text Processing Easy Cut #8 text-processing-cut-8.sh
Text Processing Easy Cut #9 text-processing-cut-9.sh
Text Processing Easy Head of a Text File #1 text-processing-head-1.sh
Text Processing Easy Head of a Text File #2 text-processing-head-2.sh
Text Processing Easy Middle of a Text File text-processing-in-linux---the-middle-of-a-text-file.sh
Text Processing Easy Tail of a Text File #1 text-processing-tail-1.sh
Text Processing Easy Tail of a Text File #2 text-processing-tail-2.sh
Text Processing Easy 'Tr' Command #1 text-processing-tr-1.sh
Text Processing Easy 'Tr' Command #2 text-processing-tr-2.sh
Text Processing Easy 'Tr' Command #3 text-processing-tr-3.sh
Text Processing Easy Sort Command #1 text-processing-sort-1.sh
Text Processing Easy Sort Command #2 text-processing-sort-2.sh
Text Processing Easy Sort Command #3 text-processing-sort-3.sh
Text Processing Easy Sort Command #4 text-processing-sort-4.sh
Text Processing Easy Sort Command #5 text-processing-sort-5.sh
Text Processing Easy 'Sort' command #6 text-processing-sort-6.sh
Text Processing Easy 'Sort' command #7 text-processing-sort-7.sh
Text Processing Easy 'Uniq' Command #1 text-processing-in-linux-the-uniq-command-1.sh
Text Processing Easy 'Uniq' Command #2 text-processing-in-linux-the-uniq-command-2.sh
Text Processing Easy 'Uniq' Command #3 text-processing-in-linux-the-uniq-command-3.sh
Text Processing Easy 'Uniq' Command #4 text-processing-in-linux-the-uniq-command-4.sh
Text Processing Medium Paste - 3 paste-3.sh
Text Processing Medium Paste - 4 paste-4.sh
Text Processing Medium Paste - 1 paste-1.sh
Text Processing Medium Paste - 2 paste-2.sh
Arrays in Bash Easy Read in an Array bash-tutorials-read-in-an-array.sh
Arrays in Bash Easy Slice an Array bash-tutorials-slice-an-array.sh
Arrays in Bash Easy Concatenate an array with itself bash-tutorials-concatenate-an-array-with-itself.sh
Arrays in Bash Easy Display an element of an array bash-tutorials-display-the-third-element-of-an-array.sh
Arrays in Bash Easy Count the number of elements in an Array bash-tutorials-count-the-number-of-elements-in-an-array.sh
Arrays in Bash Medium Filter an Array with Patterns bash-tutorials-filter-an-array-with-patterns.sh
Arrays in Bash Medium Remove the First Capital Letter from Each Element bash-tutorials-remove-the-first-capital-letter-from-each-array-element.sh
Arrays in Bash Hard Lonely Integer - Bash! lonely-integer-2.sh
Grep Sed Awk Easy 'Grep' - A text-processing-in-linux-the-grep-command-4.sh
Grep Sed Awk Easy 'Grep' - B text-processing-in-linux-the-grep-command-5.sh
Grep Sed Awk Easy 'Sed' command #3 text-processing-in-linux-the-sed-command-3.sh
Grep Sed Awk Hard 'Sed' command #4 sed-command-4.sh
Grep Sed Awk Hard 'Sed' command #5 sed-command-5.sh
Grep Sed Awk Medium 'Awk' - 1 awk-1.sh
Grep Sed Awk Medium 'Awk' - 2 awk-2.sh
Grep Sed Awk Medium 'Awk' - 3 awk-3.sh
Grep Sed Awk Medium 'Awk' - 4 awk-4.sh
Grep Sed Awk Medium 'Grep' #1 text-processing-in-linux-the-grep-command-1.sh
Grep Sed Awk Medium 'Grep' #2 text-processing-in-linux-the-grep-command-2.sh
Grep Sed Awk Medium 'Grep' #3 text-processing-in-linux-the-grep-command-3.sh
Grep Sed Awk Medium 'Sed' command #1 text-processing-in-linux-the-sed-command-1.sh
Grep Sed Awk Medium 'Sed' command #2 text-processing-in-linux-the-sed-command-2.sh

CPP

Subdomain Difficulty Challenge Solution
Introduction Easy Say "Hello, World!" With C++ cpp-hello-world.cpp
Introduction Easy Input and Output cpp-input-and-output.cpp
Introduction Easy Basic Data Types c-tutorial-basic-data-types.cpp
Introduction Easy Conditional Statements c-tutorial-conditional-if-else.cpp
Introduction Easy For Loop c-tutorial-for-loop.cpp
Introduction Easy Functions c-tutorial-functions.cpp
Introduction Easy Pointer c-tutorial-pointer.cpp
Introduction Easy Arrays Introduction arrays-introduction.cpp
Introduction Easy Variable Sized Arrays variable-sized-arrays.cpp
Strings Easy StringStream c-tutorial-stringstream.cpp
Strings Easy Strings c-tutorial-strings.cpp
Classes Easy Structs c-tutorial-struct.cpp
Classes Easy Class c-tutorial-class.cpp
Classes Easy Classes and Objects classes-objects.cpp
Classes Easy Box It! box-it.cpp
Classes Medium Inherited Code inherited-code.cpp
Classes Medium Exceptional Server exceptional-server.cpp
Classes Medium Virtual Functions virtual-functions.cpp
STL Easy Vector-Sort vector-sort.cpp
STL Easy Vector-Erase vector-erase.cpp
STL Easy Lower Bound-STL cpp-lower-bound.cpp
STL Easy Sets-STL cpp-sets.cpp
STL Easy Maps-STL cpp-maps.cpp
STL Easy Print Pretty prettyprint.cpp
STL Medium Deque-STL deque-stl.cpp

C

Subdomain Difficulty Challenge Solution
Introduction Easy "Hello World!" in C hello-world-c.c
Introduction Easy Playing With Characters playing-with-characters.c
Introduction Easy Sum and Difference of Two Numbers sum-numbers-c.c
Introduction Easy Functions in C functions-in-c.c
Introduction Easy Pointers in C pointer-in-c.c
Conditionals and Loops Easy Conditional Statements in C conditional-statements-in-c.c
Conditionals and Loops Easy For Loop in C for-loop-in-c.c
Conditionals and Loops Easy Sum of Digits of a Five Digit Number sum-of-digits-of-a-five-digit-number.c
Conditionals and Loops Easy Bitwise Operators bitwise-operators-in-c.c
Conditionals and Loops Medium Printing Pattern using Loops printing-pattern-2.c
Arrays and Strings Medium 1D Arrays in C 1d-arrays-in-c.c
Arrays and Strings Medium Array Reversal reverse-array-c.c
Arrays and Strings Medium Printing Tokens printing-tokens-.c
Arrays and Strings Medium Digit Frequency frequency-of-digits-1.c
Arrays and Strings Medium Dynamic Array in C dynamic-array-in-c.c
Functions Easy Calculate the Nth term recursion-in-c.c
Functions Easy Students Marks Sum students-marks-sum.c
Functions Medium Permutations of Strings permutations-of-strings.c
Functions Medium Variadic functions in C variadic-functions-in-c.c
Functions Hard Sorting Array of Strings sorting-array-of-strings.c
Structs and Enums Easy Boxes through a Tunnel too-high-boxes.c
Structs and Enums Medium Small Triangles, Large Triangles small-triangles-large-triangles.c
Structs and Enums Hard Post Transition post-transition.c

Interview Preparation Kit

Subdomain Difficulty Challenge Solution
Warmup Easy Counting Valleys counting-valleys.py
Warmup Easy Jumping on the Clouds jumping-on-the-clouds.py
Warmup Easy Repeated String repeated-string.py
Warmup Easy Sock Merchant sock-merchant.py
Arrays Easy 2D Array - DS 2d-array.py
Arrays Easy Arrays: Left Rotation ctci-array-left-rotation.py
Arrays Medium Minimum Swaps 2 minimum-swaps-2.py
Arrays Medium New Year Chaos new-year-chaos.py
Arrays Hard Array Manipulation crush.py
Dictionaries and Hashmaps Easy Hash Tables: Ransom Note ctci-ransom-note.py
Dictionaries and Hashmaps Easy Two Strings two-strings.py
Dictionaries and Hashmaps Medium Count Triplets count-triplets-1.py
Dictionaries and Hashmaps Medium Frequency Queries frequency-queries.py
Dictionaries and Hashmaps Medium Sherlock and Anagrams sherlock-and-anagrams.py
Graphs Hard BFS: Shortest Reach in a Graph ctci-bfs-shortest-reach.py
Graphs Hard DFS: Connected Cell in a Grid ctci-connected-cell-in-a-grid.py
Greedy Algorithms Easy Luck Balance luck-balance.py
Greedy Algorithms Easy Minimum Absolute Difference in an Array minimum-absolute-difference-in-an-array.py
Greedy Algorithms Medium Greedy Florist greedy-florist.py
Greedy Algorithms Medium Max Min angry-children.py
linked Lists Easy Find Merge Point of Two Lists find-the-merge-point-of-two-joined-linked-lists.py
Linked Lists Easy Insert a node at a specific position in a linked list insert-a-node-at-a-specific-position-in-a-linked-list.py
Linked Lists Easy Inserting a Node Into a Sorted Doubly Linked List insert-a-node-into-a-sorted-doubly-linked-list.py
Linked Lists Easy Linked Lists: Detect a Cycle ctci-linked-list-cycle.py
Linked Lists Easy Reverse a doubly linked list reverse-a-doubly-linked-list.py
Miscellaneous Easy Flipping bits flipping-bits.py
Miscellaneous Medium Time Complexity: Primality ctci-big-o.py
Recursion and Backtracking Easy Recursion: Fibonacci Numbers ctci-fibonacci-numbers.py
Recursion and Backtracking Medium Recursion: Davis' Staircase ctci-recursive-staircase.py
Recursion and Backtracking Medium Recursive Digit Sum recursive-digit-sum.py
Search Medium Hash Tables: Ice Cream Parlor ctci-ice-cream-parlor.py
Search Medium Swap Nodes [Algo] swap-nodes-algo.py
Search Medium Pairs pairs.py
Search Medium Triple sum triple-sum.py
Search Medium Minimum Time Required minimum-time-required.py
Sorting Easy Mark and Toys mark-and-toys.py
Sorting Easy Sorting: Bubble Sort ctci-bubble-sort.py
Sorting Medium Fraudulent Activity Notifications fraudulent-activity-notifications.py
Sorting Medium Sorting: Comparator ctci-comparator-sorting.py
Sorting Hard Merge Sort: Counting Inversions ctci-merge-sort.py
Stacks and Queues Medium Balanced Brackets balanced-brackets.py
Stacks and Queues Medium Castle on the Grid castle-on-the-grid.py
Stacks and Queues Medium Largest Rectangle largest-rectangle.py
Stacks and Queues Medium Queues: A Tale of Two Stacks ctci-queue-using-two-stacks.py
Stacks and Queues Hard Poisonous Plants poisonous-plants.py
Strings Easy Alternating Characters alternating-characters.py
Strings Easy Strings: Making Anagrams ctci-making-anagrams.py
Strings Medium Sherlock and the Valid String sherlock-and-valid-string.py
Strings Medium Special Palindrome Again special-palindrome-again.py
Strings Medium Common Child common-child.py
Trees Easy Binary Search Tree : Lowest Common Ancestor binary-search-tree-lowest-common-ancestor.py
Trees Easy Tree: Height of a Binary Tree tree-height-of-a-binary-tree.py
Trees Medium Tree: Huffman Decoding tree-huffman-decoding.py
Trees Medium Trees: Is This a Binary Search Tree? ctci-is-binary-search-tree.py