I still remember the time when I started preparing for Tech interviews and landed on the platform called Hackerrank. Someone had suggested it to me before but I did not take it seriously but now I am on it and it's helpful.
I saw that there is a separate section for interview preparation where they clubbed handpicked questions and gave them to us to ease our preparation.
I will try and solve the questions here and post their solutions with explanations because I know it gets frustrating sometimes when we get stuck. You are welcome.
One more thing, I like programming in java because of its verbosity and things get much more understandable. I will be sharing the solutions to you in Java.
Disclaimer
Some of the questions were difficult for me to solve and so I have left them for the future. I hope you still find the solution to your question.
Arrays
So let's dive in and see how many questions are there in the Array subsection of the Interview Preparation Kit at Hackerrank.
- Hackerrank Solution: 2D Array - DS.
- Hackerrank Solution: Arrays: Left Rotation.
- Hackerrank Solution: New Year Chaos.
- Hackerrank Solution: Min Swaps 2.
- Hackerrank Solution: Array Manipulation.
So after this, I hope you have gotten confident in solving arrays.
Sorting
Let's cover the questions related to sorting here. In my opinion, they are pretty easy to solve.
- Hackerrank Solution: Sorting: Bubble Sort.
- Hackerrank Solution: Mark And Toys.
- Hackerrank Solution: Sorting Comparator.
- Hackerrank Solution: Merge Sort: Counting Inversions.
- Hackerrank Solution: Fraudulent Activity Notification.
Good going so far.
Searching
Things will get a little trickier for you as you move on but keep going.
Here are the solutions for you.
- Hackerrank Solution: HashTables: Ice Cream Parlour.
- Hackerrank Solution: Pairs.
- Hackerrank Solution: Tripple Sum.
- Hackerrank Solution: Swap Nodes[Algo].
- Hackerrank Solution: Minimum Time Required.
- Hackerrank Solution: Maximum Subarray Sum.
- Hackerrank Solution: Making Candies.
Those really got me when I was solving them, kudos to you.
String Manipulation
Strings are important and are quite common in the interview, here is the juice you are looking for.
- Hackerrank Solution: Strings: Making Anagrams.
- Hackerrank Solution: Alternating Characters.
- Hackerrank Solution: Sherlock And Valid String.
- Hackerrank Solution: Common Child.
- Hackerrank Solution: Special String Again.
Dictionaries and HashMaps
Hashing is one of my favorite topics, it is very widely used in production level code also.
- Hackerrank Solution: Count Triplets.
- Hackerrank Solution: Sherlock and Anagrams.
- Hackerrank Solution: Frequency Queries.
- Hackerrank Solution: Hash Tables: Ransom Note.
- Hackerrank Solution: Two Strings.
They were interesting, right?
Linked Lists
Lists are always easy to solve and a boost to confidence whenever asked in an interview.
- Hackerrank Solution: Insert a node at a specific position in a linked list.
- Hackerrank Solution: Insert a node into a sorted doubly linked list.
- Hackerrank Solution: Reverse a doubly linked list.
- Hackerrank Solution: Find Merge point of two lists.
- Hackerrank Solution: Linked List: Detect A Cycle.
Things will get challenging from now on.
Stacks and Queues
They are the juice of every interview and you can expect that you will be asked a question on stack or queue data-structure in your next interview.
- Hackerrank Solution: Balanced Brackets.
- Hackerrank Solution: Queue: A Tale Of Stacks.
- Hackerrank Solution: Largest Rectangle.
- Hackerrank Solution: Castle On A Grid.
- Hackerrank Solution: Min Max Riddle.
- Hackerrank Solution: Poisonous Plants.
Greedy
let's be a little greedy when we learn.
- Hackerrank Solution: Maximum Absolute Difference In An Array.
- Hackerrank Solution: Greedy Florist.
- Hackerrank Solution: Max Min.
- Hackerrank Solution: Luck Balance.
- Hackerarnk Solution: Reverse Shuffle Merge.
Trees
It's just about choosing the right traversal.
- Hackerrank Solution:Tree: Height Of A Binary Tree.
- Hackerrank Solution: Binary Search Tree: Lowest Common Ancestor.
- Hackerrank Solution: Trees: Huffman Decoding.
- Hackerrank Solution: Trees: Is This a Binary Search Tree?
- Hackerrank Solution: Balanced Forest.
Graphs
finally, we reached here.
- Hackerrrank Solution: Roads And Libraries.
- Hackerrrank Solution: Find The Nearest Clone.
- Hackerrrank Solution: BFS Shortest Reach in a Graph.
- Hackerrrank Solution: DFS Connected Cell In A Grid.
- Hackerrank Solution: Matrix.
These were difficult, right?
Recursion And Backtracking
Since you know stacks, they would be easy to understand.
- Hackerrank Solution: Recursion: Fibonacci Number.
- Hackerrank Solution: Recursion: Davis' Staircase.
- Hackerrank Solution: Recursive Digit Sum.
- Hackerrank Solution: Crossword Puzzle.
That's level 1 we still have Dynamic programming to cover.
Dynamic Programming
Just like in Mario bros we had the boss challenge at the last. You can assume this to be the boss.
- Hackerrank Solution: Max Array Sum.
- Hackerrank Solution: Candies.
- Hackerrank Solution: Decibinary Numbers.
- Hackerrank Solution: Abbreviations.
Miscellaneous
We got you covered.
- Hackerrank Solution: Friend Circle Queries.
- Hackerrank Solution: Time Complexity: Primality.
- Hackerrank Solution: Flipping Bits.
- Hackerrank Solution: Maximum Xor.
Thank you for reading this blog, I will keep bringing more articles related to coding and tech. Till then Sayonara.
Solutions to Hackerrank Interview Preparation Kit.
Reviewed by Jas Arora
on
May 29, 2020
Rating:
No comments:
If you have any doubts please let me know.