interview-preparation-kit

Interview preparation kit of hackerrank solutions

View on GitHub

interview-preparation-kit

Solutions to all the problems of Interview Preparation Kit on HackerRank, LeetCode problems, and Interviewbit in C++, Java, Python and Javascript.

Question solved

HackerRank

Topic Question CPP JAVA Python JavaScript
Warm Up Challenges          
  Sock Merchant Done Done Done Done
  Counting Valleys Done Done Done Done
  Jumping on the Clouds Done Done Done Done
  Repeated Strings Done Done Done Done
Arrays          
  Arrays: Left Rotation Done Done Done Done
  New Year Chaos Done Done Done Done
  2D Arrays Done Done Done Done
  Minimum Swaps 2 Done Done Done Done
  Array Manipulation Done Done Done Done
Dictionaries and Hashmaps          
  Ransom Note Done Done Done Done
  Two Strings Done Done Done Done
  Frequency Queries Done Done Done Done
  Sherlock and Anagrams Done Done Done Done
  Count Triplets Done Done Done Done
Sorting          
  Bubble Sort Done Done Done Done
  Mark and Toys Done Done Done Done
  Comparator Done Done Done  
  Fraudulent Activity Notifications Done Done Done Done
  Counting Inversions - Merge Sort Done Done Done Done
String Manipulation          
  Making Anagrams Done Done Done Done
  Sherlock and Valid String Done Done Done Done
  Special String Again Done Done Done Done
  Common Child Done Done Done Done
  Alternating Characters Done Done Done Done
Greedy Algorithms          
  Luck Balance Done Done Done Done
  Minimum Absolute Difference in an Array Done Done Done Done
  Greedy Florist Done Done Done Done
  Max Min Done Done Done Done
  Reverse Shuffle Merge Done Done Done Done
Search          
  Minimum Time Required Done Done Done  
  Pairs Done Done Done  
  Triple Sum Done Done Done  
  Maximum Subarray Sum Done Done Done  
  Hash Tables: Ice Cream Parlor Done Done Done  
  Swap Nodes [Algo] Done Done Done  
  Making Candies Done Done Done  
Dynamic Programming          
  Max Sum Array Done Done Done  
  Candies Done Done Done  
  Abbreviation Done Done Done  
  Decibinary Numbers Done Done Done  
Stacks and Queues          
  Balanced Brackets Done Done Done  
  Queues: A Tale of Two Stacks Done Done Done  
  Largest Rectangle Done Done Done  
  Min Max Riddle Done Done Done  
  Castle on the Grid Done Done Done  
  Poisonous Plants Done Done Done  
Graphs          
  Roads and Libraries Done Done Done  
  Find the nearest clone Done Done Done  
  BFS: Shortest Reach in a Graph Done Done Done  
  DFS: Connected Cell in a Grid Done Done Done  
  Matrix   Done Done  
Trees          
  Tree: Height of a Binary Tree Done Done Done  
  Binary Search Tree: Lowest Common Ancestor Done Done Done  
  Tree: Is This a Binary Search Tree? Done   Done  
  Tree: Huffman Decoding Done Done Done  
  Balanced Forest Done Done Done  
Linked List          
  Insert a node at a specific position in a linked list Done Done Done  
  Reverse a doubly linked list Done Done Done  
  Find Merge Points of Two lists Done Done Done  
  Linked Lists: Detect a cycle Done Done Done  
  Inserting a Node Into a Sorted Doubly Linked List Done Done Done  
Recursion and Backtracking          
  Fibonacci Numbers Done Done Done  
  Davis’ Staircase Done Done Done  
  Crossword Puzzle Done Done Done  
  Recursive Digit Sum Done Done Done  
Miscellaneous          
  Flipping Bits Done Done Done  
  Time Complexity: Primality Done Done Done  
  Friend Circle Queries Done Done Done  
  Maximum Xor Done Done Done  

LeetCode

Problem # Problem Name Difficulty CPP JAVA Python
1 Two Sum Easy Done
2 Add Two Numbers Medium Done
3 Longest Substring Without Repeating Characters Medium Done
4 Median of Two Sorted Arrays Hard Done
5 Longest Palindromic Substring Medium Done
6 Zigzag Conversion Medium Done
7 Reverse Integer Medium Done
8 String to Integer (atoi) Medium Done
9 Palindrome Number Easy Done Done Done
10 Regular Expression Matching Hard Done Done Done
11 Container With Most Water Medium Done Done Done
12 Integer to Roman Medium Done Done Done
13 Roman to Integer Easy Done Done Done
14 Longest Common Prefix Easy Done Done Done
15 3Sum Medium Done Done Done
16 3Sum Closest Medium Done Done Done
17 Letter Combinations of a Phone Number Medium Done Done Done
18 4Sum Medium Done Done Done
19 Remove Nth Node From End of List Medium Done Done Done
20 Valid Parentheses Easy Done Done Done
21 Merge Two Sorted Lists Easy Done Done Done
22 Generate Parentheses Medium Done Done Done
23 Merge k Sorted Lists Hard Done Done Done
24 Swap Nodes in Pairs Medium Done Done Done
25 Reverse Nodes in k-Group Hard Done Done Done
26 Remove Duplicates from Sorted Array Easy Done Done Done
27 Remove Element Easy Done Done Done
28 Find the Index of the First Occurrence in a String Easy Done Done Done
29 Divide Two Integers Medium Done Done Done
30 Substring with Concatenation of All Words Hard Done Done Done
31 Next Permutation Medium Done Done Done
32 Longest Valid Parentheses Hard Done Done Done
33 Search in Rotated Sorted Array Medium Done Done Done
34 Find First and Last Position of Element in Sorted Array Medium Done Done Done
35 Search Insert Position Easy Done Done Done
36 Valid Sudoku Medium Done Done Done
37 Sudoku Solver Hard Done Done Done
38 Count and Say Medium Done Done Done
39 Combination Sum Medium Done Done Done
40 Combination Sum II Medium Done Done Done
41 First Missing Positive Hard Done Done Done
42 Trapping Rain Water Hard Done Done Done
43 Multiply Strings Medium Done Done Done
44 Wildcard Matching Hard Done Done Done
45 Jump Game II Medium Done Done Done
46 Permutations Medium Done Done Done
47 Permutations II Medium Done Done Done
48 Rotate Image Medium Done Done Done
49 Group Anagrams Medium Done Done Done

Interviewbit

Topic Question CPP JAVA Python JavaScript
Arrays          
  Min Steps in Infinite Grid        

Communication channel

https://gitter.im/interview-prep-comm/community

Contribution Guidelines

https://www.hackerrank.com/interview/interview-preparation-kit
Go to this link and solve the problems in C++, Java, Python or Javascript. Save the source file in the corresponding folder in your forked repo. Please update the readme with the completed question’s link in the appropriate format, pointing to its address in the master repo, and then make a pull request. Here we are going to expand this project to more questions, ny adding microsoft interview question from GeeksForGeeks . The solution should be in any language from readme table :)