Skip to content

Latest commit

 

History

History
91 lines (85 loc) · 2.48 KB

File metadata and controls

91 lines (85 loc) · 2.48 KB

My solutions to challenges from the HackerRank's Interview Preparation Kit. Solutions are written in Go or C++ (where it wasn't possible to use Go). I think they're quite easy to understand and as compact as possible at the same time.

Warning: solutions are mine and every approach might be biased and/or suboptimal (though passing all test cases).

Table of Contents

  1. Arrays
    1. 2D Array - DS
    2. Arrays: Left Rotation
    3. New Year Chaos
    4. Minimum Swaps 2
    5. Array Manipulation
  2. Dictionaries and Hashmaps
    1. Hash Tables: Ransom Note
    2. Two Strings
    3. Sherlock and Anagrams
    4. Count Triplets
    5. Frequency Queries
  3. Dynamic Programming
    1. Max Array Sum
    2. Abbreviation
    3. Candies
    4. Decibinary Numbers
  4. Greedy Algorithms
    1. Minimum Absolute Difference in an Array
    2. Luck Balance
    3. Greedy Florist
    4. Max Min
    5. Reverse Shuffle Merge
  5. Linked Lists
    1. Insert a node at a specific position in a linked list
    2. Inserting a Node Into a Sorted Doubly Linked List
    3. Reverse a doubly linked list
    4. Find Merge Point of Two Lists
    5. Linked Lists: Detect a Cycle
  6. Miscellaneous
    1. Flipping bits
    2. Time Complexity: Primality
    3. Friend Circle Queries
    4. Maximum Xor
  7. Recursion and Backtracking
    1. Recursion: Fibonacci Numbers
    2. Recursion: Davis' Staircase
    3. Crossword Puzzle
    4. Recursive Digit Sum
  8. Search
    1. Hash Tables: Ice Cream Parlor
    2. Swap Nodes [Algo]
    3. Pairs
    4. Triple sum
    5. Minimum Time Required
    6. Maximum Subarray Sum
    7. Making Candies
  9. Sorting
    1. Sorting: Bubble Sort
    2. Mark and Toys
    3. Sorting: Comparator
    4. Fraudulent Activity Notifications
    5. Merge Sort: Counting Inversions
  10. Stacks and Queues
    1. Balanced Brackets
    2. Queues: A Tale of Two Stacks
    3. Largest Rectangle
    4. Min Max Riddle
    5. Castle on the Grid
    6. Poisonous Plants
  11. String Manipulation
    1. Strings: Making Anagrams
    2. Alternating Characters
    3. Sherlock and the Valid String
    4. Special String Again
    5. Common Child
  12. Trees
    1. Tree: Height of a Binary Tree
    2. Binary Search Tree : Lowest Common Ancestor
    3. Trees: Is This a Binary Search Tree?
    4. Tree: Huffman Decoding
    5. Balanced Forest
  13. Warm-up Challenges
    1. Sock Merchant
    2. Counting Valleys
    3. Jumping on the Clouds
    4. Repeated String

Status

⚫⚫⚫⚫⚫⚫⚫⚪⚪⚪ 71%

This repo is still a work in progress.