### Top 20 Sorting and Searching Algorithms Questions for Interviews\n\n#### A Collection of common coding problems from Interviews based on basic algorithms like searching, sorting, and string algorithms\n\nHello All, If you are preparing for [Programming job interviews](https://javarevisited.blogspot.com/2011/06/top-programming-interview-questions.html) or looking for a new job then you know that it’s not an easy process. You got to be lucky to get the call and make to the first round of interview, not just when you are a beginner but at any stage of your career.\n\nBut, Yes, it is the most difficult at the beginner level when you are searching for your first job.\n\n> That’s why you can’t just take your chance lightly. You got to be prepared to grab that chance and for that, you must know that is expected from you on the interview. What is asked, what topics should you prepare, etc?\n\nI have blogged a lot about what you can find helpful articles in this blog but to recap let me tell you that apart from [data structure questions](http://www.java67.com/2018/06/data-structure-and-algorithm-interview-questions-programmers.html), [System Design Questions](http://www.java67.com/2018/05/top-20-system-design-interview-questions-answers-programming.html), and Programming language specific questions like [Java](http://javarevisited.blogspot.sg/2015/10/133-java-interview-questions-answers-from-last-5-years.html), [C++](http://www.java67.com/2019/04/top-10-c-interview-questions-and-answers.html), or [Scala](https://javarevisited.blogspot.com/2017/03/top-30-scala-and-functional-programming.html), most of the programming job interviews also ask algorithm based questions. \n \nThese are based upon common searching and sorting algorithms like [String algorithms](https://javarevisited.blogspot.com/2015/01/top-20-string-coding-interview-question-programming-interview.html), [binary search](https://medium.freecodecamp.org/how-to-implement-a-binary-search-algorithm-in-java-without-recursion-67d9337fd75f), [graph algorithms](http://bit.ly/2NAbaIR), etc.\n\nIt’s important that you practice these Algorithms based questions because even though they seem obvious and easy, sometimes they become tricky to solve in the actual interview, especially if you have never coded them by yourself.\n\n> Practising these problems before interview not only makes you familiar with them but also gives you more confidence in explaining the solution to the interviewer, which plays a very important role in your selection.\n\nIt also makes you ready for any twisted questions and alternative problems like Interviewers often like to ask you to solve a particular coding problem using [Recursion](https://javarevisited.blogspot.com/2012/12/recursion-in-java-with-example-programming.html#axzz5lX7tvDaU) or [Iteration](https://javarevisited.blogspot.com/2017/03/how-to-reverse-linked-list-in-java-using-iteration-and-recursion.html). \n \nSometime, if you use a data structure like the one I have used in [finding duplicate characters on String](http://www.java67.com/2014/03/how-to-find-duplicate-characters-in-String-Java-program.html), they will ask you to solve that problem without using the Set data structure. That’s just some common example and that’s why practice matters a lot. \n \nBtw, if you are a complete beginner in the world of Data Structure and Algorithms, then I suggest you to first go through a comprehensive Algorithm course like [**Data Structures and Algorithms: Deep Dive Using Java**](https://click.linksynergy.com/fs-bin/click?id=JVFxdTr9V80&subid=0&offerid=323058.1&type=10&tmpid=14538&RD_PARM1=https%3A%2F%2Fwww.udemy.com%2Fdata-structures-and-algorithms-deep-dive-using-java%2F) on Udemy which will not only teach you basic data structure and algorithms but also how to use them on the real world and how to solve coding problems using them.\n\n[Data Structures and Algorithms: Deep Dive Using Java](https://www.udemy.com/course/data-structures-and-algorithms-deep-dive-using-java/?LSNPUBID=JVFxdTr9V80&ranEAID=JVFxdTr9V80&ranMID=39197&ranSiteID=JVFxdTr9V80-j1_h5QYWUWK37aOdigZDYA)\n\nOn the other hand, if you like to read books or prefer books over online courses then you must read a comprehensive book like [**Introduction to Algorithms**](http://www.amazon.com/dp/0072970545/?tag=javamysqlanta-20) by Thomas H. Cormen to get an understanding of common Computer Science Algorithms like Searching, Sorting, Cryptography, [Graph Algorithms](http://bit.ly/2NAbaIR) and some common ones like Fourier Transform.\n\n[Introduction to Algorithms, 3rd Edition (The MIT Press)](http://www.amazon.com/dp/0072970545/?tag=javamysqlanta-20)\n\n### 20+ Searching and Sorting Algorithms Questions from Coding Interviews\n\nAnyway, here is some of the frequently asked Searching and Sorting Algorithms questions from Interviews. I have linked the solution but you should try to solve the problem before looking at the solution.\n\nThe purpose of this article is that you should know how to solve these problems on your own, but, yes, if you got stuck and want to compare your solution, you can see the solution. \n \n \n**1\\. Can you implement a Binary Search Algorithm? (**[**solution**](http://www.java67.com/2016/10/binary-search-using-recursion-in-java.html)**)** \nIt’s easy, binary search is a divide and conquers algorithm, where the problem is divided into sub-problem and those are solved. It’s a search algorithm which means it is used to find things like a number in an integer array or an item in a catalog. \n \nThe easiest way to implement a [binary search algorithm](https://javarevisited.blogspot.com/2017/04/recursive-binary-search-algorithm-in-java-example.html) is by using Recursion, which is what the solution link contains but you should try it yourself before seeing the solution. \n \nOne of the worth noting this is that the input must be sorted, I mean you can only implement binary search in a [sorted array](http://www.java67.com/2014/12/how-to-find-missing-number-in-sorted.html). \n \n \n**2\\. Write a program to implement Linear search Algorithm? (**[**solution**](http://www.java67.com/2016/10/how-to-implement-linear-search-in-java.html)**)** \nIt is even easier than binary search, all you need to do is go through all elements in the array using a [for loop](https://javarevisited.blogspot.com/2015/08/java-8-journey-of-for-loop-in-java.html) or recursive method and compare each element with the one you want to search. when an element matches you either return index or true/false depending upon your requirement. \n \nFor example, if you are writing a [contains() method](http://www.java67.com/2015/09/how-to-check-if-key-exits-in-hashmap-in-java.html) you can return true or false to indicate whether an element is present in the array or not. Since you need to scan the whole array to find the element, the time complexity of this algorithm is O(n).\n\nBtw, if you have trouble calculating and understanding time and space complexity of algorithms then you should see a course like [**Data Structures & Algorithms — Interview**](https://click.linksynergy.com/fs-bin/click?id=JVFxdTr9V80&subid=0&offerid=323058.1&type=10&tmpid=14538&RD_PARM1=https%3A%2F%2Fwww.udemy.com%2Flearn-data-structure-algorithms-with-java-interview%2F) to understand them better before going for an interview. \n \n \n**3\\. Can you implement a Binary search Algorithm without recursion? (**[**solution**](https://javarevisited.blogspot.com/2018/06/binary-search-in-java-without-recursion.html)**)** \nYou might know that you can replace a recursive algorithm to an iterative one by using a loop and sometimes using a [Stack](http://www.java67.com/2013/08/ata-structures-in-java-programming-array-linked-list-map-set-stack-queue.html) data structure. For binary search also you can do this, just divide the array and compare the middle element until you find the target element or there is no more element into an array.\n\n> If the target element is greater than middle than you got to move towards the right, or otherwise towards left.\n\nBtw, if you have trouble understanding recursive algorithm or converting a recursive one to iterative one then I suggest you go through a good online course like [**Algorithms and Data Structures — Part 1**](https://pluralsight.pxf.io/c/1193463/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fcourses%2Fads-part1) and [**Part 2**](https://pluralsight.pxf.io/c/1193463/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fcourses%2Fads2) in Pluralsight to learn fundamentals better.\n\nThese courses will also teach you about how to calculate time and space complexity which is very important from both Coding Interview perspective as well as improving the performance of an Algorithm.\n\n[!(https://cdn-images-1.medium.com/max/400/0*VgxALDyBonJJQJRP.jpg)](https://pluralsight.pxf.io/c/1193463/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fcourses%2Fads-part1)\n\n**5\\. Implement the Bubble sort Algorithm? (**[**solution**](http://javarevisited.blogspot.sg/2014/08/bubble-sort-algorithm-in-java-with.html#axzz5ArdIFI7y)**)** \nIsn’t this was the first sorting algorithm you learn? Well, I did and that’s why I remember that [bubble sort](http://www.java67.com/2012/12/bubble-sort-in-java-program-to-sort-integer-array-example.html) is about comparing each number with every other number in an array so that after each pass the [largest or smallest element](https://javarevisited.blogspot.com/2017/03/how-to-find-largest-and-smallest-number.html) bubble up to the top.\n\nI mean the number has found it’s placed in the sorting order. This is one of the fundamental sorting algorithms and most of us started learning about sorting using this algorithm.\n\n> The time complexity of this is O(n ^2) which makes it unusable for a large set of numbers but it does well for a small set of numbers.\n\n**4\\. Write Code to implement Level Order Search in a Binary Tree? (solution)** \nIn level order search you first visit sibling nodes than going down into the next level. You can use a [Queue](https://javarevisited.blogspot.com/2017/03/difference-between-stack-and-queue-data-structure-in-java.html) to implement level order search in a binary tree.If you want to learn more, you can check any of these [free data structure and algorithms courses](https://medium.freecodecamp.org/these-are-the-best-free-courses-to-learn-data-structures-and-algorithms-in-depth-4d52f0d6b35a) on [freeCodeCamp](https://medium.com/u/8b318225c16a)\n\nAnd, if you are really serious about doing well, you can also check this [list of courses to crack your programming job interviews](https://dev.to/javinpaul/10-data-structure-algorithms-sql-and-java-courses-to-crack-any-programming-job-interview-11f6)\n\n[10 Data Structure, Algorithms, and SQL Courses to Crack Any Programming Job Interview](https://dev.to/javinpaul/10-data-structure-algorithms-sql-and-java-courses-to-crack-any-programming-job-interview-11f6)\n\n**6\\. Difference between a stable and unstable sorting algorithm? (**[**answer**](https://javarevisited.blogspot.com/2017/06/difference-between-stable-and-unstable-algorithm.html)**)** \nThis one was a tricky concept which I didn’t know until long ago. I haven’t come across any practical use case of this one yet but just knowing the concept is Ok from the interview perspective.\n\nIn a stable sorting algorithm, the order of the same element remains the same even after sorting but during the unstable sorting algorithm, this changes.\n\nA good example is a [quicksort](http://www.java67.com/2014/07/quicksort-algorithm-in-java-in-place-example.html) and [mergesort](http://www.java67.com/2018/03/mergesort-in-java-algorithm-example-and.html) where former is unstable while later is a stable algorithm. \n \n \n**7\\. What is Depth First Search Algorithm for a binary tree? (solution)** \nIt’s another popular searching algorithm which is mainly used in tree and graphs. This algorithm first visits nodes in depth before searching in the same level, that’s why the name Depth-first search algorithm.\n\nIt’s tricky to implement but you can use a Stack to implement DFS or Depth-first search algorithm. If you need more information on this topic, I suggest you check the [**Grokking Algorithms**](https://www.amazon.com/Grokking-Algorithms-illustrated-programmers-curious/dp/1617292230/?tag=javamysqlanta-20) book by Aditya Bhargava, his explanation is probably the best explanation of this topic\n\n[!(https://cdn-images-1.medium.com/max/400/0*PbfvcBhBO046hHgJ.jpg)](https://www.amazon.com/Grokking-Algorithms-illustrated-programmers-curious/dp/1617292230/?tag=javamysqlanta-20)\n\n**8\\. How is an iterative quicksort algorithm implemented? (**[**solution**](http://javarevisited.blogspot.sg/2016/09/iterative-quicksort-example-in-java-without-recursion.html#axzz5ArdIFI7y)**)** \nObviously without recursion:-). If you remember, I have told you before that you can use a Stack to convert a [recursive algorithm](https://javarevisited.blogspot.com/2012/12/recursion-in-java-with-example-programming.html) into an iterative one and that’s what you can do as well to implement Quicksort algorithm without recursion. You can further see the [solution](https://javarevisited.blogspot.com/2016/09/iterative-quicksort-example-in-java-without-recursion.html) if you need more help with respect to implementation. \n \n \n**9\\. How do you implement a counting sort algorithm? (**[**solution**](http://www.java67.com/2017/06/counting-sort-in-java-example.html)**)** \nJust like we have done with other O(n) sorting algorithms like Radix sort and Bucket sort.\n\nIf you don’t know [Counting sort](http://www.java67.com/2017/06/counting-sort-in-java-example.html) is another integer sorting algorithm for sorting a collection of objects according to keys that are small integers.\n\nIt has O(n) time complexity which makes it faster than likes of [Quicksort](https://javarevisited.blogspot.com/2014/08/quicksort-sorting-algorithm-in-java-in-place-example.html) and [Mergesort](http://www.java67.com/2018/03/mergesort-in-java-algorithm-example-and.html) for a particular set of input. See the solution for more details.\n\n**10\\. How do you swap two numbers without using the third variable? (**[**solution**](http://www.java67.com/2015/08/how-to-swap-two-integers-without-using.html)**)** \nAnother tricky question which is easy if you know the trick :-) Well you can swap two numbers without using a temporary or third variable if you can store the sum of numbers in one number and then minus the sum with other number something like \n \na = 3; \nb = 5; \n \na = a + b; //8 \nb = a — b; // 3 \na = a — b; //5 \n \nnow you have a = 5 and b = 3, so numbers are swapped without using a third or temp variable. \n \n \n**11\\. How is a radix sort algorithm implemented? (**[**solution**](http://www.java67.com/2018/03/how-to-implement-radix-sort-in-java.html)**)** \nThis is another integer sorting algorithm with O(n) time complexity. As per Wikipedia, Radix sort is a [non-comparative sorting algorithm](https://javarevisited.blogspot.com/2017/02/difference-between-comparison-quicksort-and-non-comparison-counting-sort-algorithms.html) that sorts data with integer keys by grouping keys by the individual digits which share the same significant position and value.\n\nYou can further see [**Algorithms, Part I**](http://bit.ly/algorithms-part1) and [**Part II**](http://bit.ly/algorithms-part2) by Robert Sedgewick on [Coursera](https://medium.com/u/99c0fb464c1f) to learn more about these O(n) or liner sorting algorithms. The course is free for learning and exploring but you need to pay if you also want a certification.\n\n[!(https://cdn-images-1.medium.com/max/1024/1*cCP62ijw7RfbUSjb85qKMw.jpeg)](http://bit.ly/algorithms-part1)\n\n**12\\. How do you implement an insertion sort algorithm? (**[**solution**](http://www.java67.com/2014/09/insertion-sort-in-java-with-example.html)**)** \nHave you ever arranged the deck of cards, or maybe shirts in your cupboard? What is common between those two things? Well, you put the next card or shirt into their proper position, or, should I say you insert the next element in its proper position. That’s the [_insertion sort_](http://www.java67.com/2014/09/insertion-sort-in-java-with-example.html) for you. \n \n \n**13\\. Write Algorithm to check if two rectangles overlap with each other? (**[**solution**](http://javarevisited.blogspot.sg/2016/10/how-to-check-if-two-rectangle-overlap-in-java-algorithm.html)**)** \nThis is a tricky Algorithm question but if you have to listen to your teacher in your 2D Maths class then you can solve this problem. There is another trick, check for all the conditions when rectangle will not overlap and if any condition is false it means both rectangles are overlapping with each other. For example, if the upper side of one rectangle is below the lower side of other rectangles then they won’t overlap as they are vertically aligned. \n \n \n**14\\. How is a merge sort algorithm implemented? (**[**solution**](http://www.java67.com/2018/03/mergesort-in-java-algorithm-example-and.html)**)** \nSimilar to Quicksort, merge sort is also a divide and conquer algorithm which means you keep divides the problem until you can sort the smallest of them.\n\nFor example to [sort an array of numbers](http://www.java67.com/2016/07/how-to-sort-array-in-descending-order-in-java.html) you divide the array into smaller parts until you know how to sort them like an array with one or zero elements is already sorted. Once you sort small arrays you merge them to get the final result. \n \nThe only [difference between Quicksort and Mergesort](https://javarevisited.blogspot.com/2017/06/difference-between-stable-and-unstable-algorithm.html) is that mergesort is **stable** while Quicksort is **not-stable**. This means equal elements retain their spot before and after sorting. \n \nAnother worth noting difference is that even though both have O(NLogN) average time, it’s better to use quicksort than mergesort because Quicksort takes less time for the same number of input, the constant factor is less in Quicksort than merge sort.\n\n[!(https://cdn-images-1.medium.com/max/400/0*zeqtqLdrVXEHwHzd.png)](https://javarevisited.blogspot.com/2019/04/top-20-searching-and-sorting-algorithms-interview-questions.html)\n\n**15\\. How do you implement a bucket sort algorithm? (**[**solution**](http://javarevisited.blogspot.sg/2017/01/bucket-sort-in-java-with-example.html)**)** \nThe Bucket sort is another awesome algorithm which can sort an array without even comparing elements.\n\nIt’s known as [non-comparison sorting algorithm](https://javarevisited.blogspot.com/2017/02/difference-between-comparison-quicksort-and-non-comparison-counting-sort-algorithms.html) and can give O(n) performance for the selected input.\n\nIf you don’t know about the non-comparison based sorting Algorithm, please see [**Introduction to Algorithms**](http://www.amazon.com/dp/0072970545/?tag=javamysqlanta-20) book.\n\n[!(https://cdn-images-1.medium.com/max/250/1*ekEzC-QIkXuV2FouD60C3w.png)](http://www.amazon.com/dp/0072970545/?tag=javamysqlanta-20)\n\n**16\\. Write Algorithms to Check if Two String are Anagram (**[**Solution**](http://javarevisited.blogspot.sg/2013/03/Anagram-how-to-check-if-two-string-are-anagrams-example-tutorial.html#axzz5F18OIWfY)**)** \nAn anagram is something where length and character matches but not the order like Army and Mary, both have the same number of characters.\n\nOne trick is to solve this problem is to [sort the character array](http://www.java67.com/2016/07/how-to-sort-array-in-descending-order-in-java.html) and check if they are the same or not. \n \n**17\\. Implement the QuickSort Algorithm in your Favorite Programing language? (**[**solution**](https://javarevisited.blogspot.com/2014/08/quicksort-sorting-algorithm-in-java-in-place-example.html)**)** \nThis one is a very easy sorting algorithm, but only if you have practiced, if not then you may lose your way. Remember, **Quicksort** is a [divide and conquer algorithm](https://dev.to/javinpaul/50-data-structure-and-algorithms-problems-from-coding-interviews-4lh2) which means you keep dividing array, also known as **partitioning**. Then you solve the problem at the smallest level, also known as a base case like when your array contains just one or zero elements. \n \n \n**19, Difference between Comparison and Non-Comparison Sorting Algorithms? (**[**answer**](https://javarevisited.blogspot.com/2017/02/difference-between-comparison-quicksort-and-non-comparison-counting-sort-algorithms.html)**)** \nAs the name suggests, in comparison based sorting algorithms you must compare elements to sort like quicksort, but in non-comparison based sorting algorithm like [Counting sort](http://www.java67.com/2017/06/counting-sort-in-java-example.html), you can sort elements without comparing it. Surprised?\n\nWell yes, then I suggest you check out this course to learn more about O(n) sorting algorithms like Radix Sort, Counting Sort, and Bucket Sort. You can further see [**Data Structures and Algorithms: Deep Dive**](https://click.linksynergy.com/fs-bin/click?id=JVFxdTr9V80&subid=0&offerid=323058.1&type=10&tmpid=14538&RD_PARM1=https%3A%2F%2Fwww.udemy.com%2Fdata-structures-and-algorithms-deep-dive-using-java%2F) if you want to learn more about these O(n) sorting algorithms.\n\n[Data Structures and Algorithms: Deep Dive Using Java](https://www.udemy.com/course/data-structures-and-algorithms-deep-dive-using-java/?LSNPUBID=JVFxdTr9V80&ranEAID=JVFxdTr9V80&ranMID=39197&ranSiteID=JVFxdTr9V80-AgJAhtu7fQl1iR5OccjJeQ)\n\n**19\\. How to check if two String is rotations of each other? (**[**solution**](https://javarevisited.blogspot.com/2017/07/2-ways-to-check-if-one-string-is-rotation-of-another-String.html)**)** \nThere is a simple trick to solve this problem, _just concatenate the String with itself and check if the rotation exists there._ You can do that by using indexOf or substring method. If the concatenated String contains rotation then given String is a rotation of former. \n \n**20\\. Implement Sieve of Eratosthenes Algorithms for Prime Number? (**[**solution**](https://javarevisited.blogspot.com/2015/05/sieve-of-Eratosthenes-algorithm-to-generate-prime-numbers-in-java.html)**)** \nThis is one of the tough algorithms to implement especially if you don’t remember it :-) Sometime interviewer gives you the explanation but other times you need to remember it. \n \nI hope these 20 questions should be enough to get you going on your preparation for Algorithms for Coding interviews. If you need more such coding questions you can take help from books like [**Cracking The Code Interview**](http://www.amazon.com/Cracking-Coding-Interview-6th-Edition/dp/0984782850/?tag=javamysqlanta-20), by [Gayle Laakmann McDowell](https://medium.com/u/e21bc4f4525e) which contains 189+ Programming questions and solution. A good book to prepare for programming job interviews in a short time.\n\n[!(https://cdn-images-1.medium.com/max/224/0*BJfsZ5uHVvkmpLwT.jpg)](http://www.amazon.com/Cracking-Coding-Interview-6th-Edition/dp/0984782850/?tag=javamysqlanta-20)\n\nBy the way, the more questions you solve in practice, the better your preparation will be. So, if you think this list of questions is not enough and you need more, then check out these additional [50 programming questions](http://javarevisited.blogspot.sg/2015/02/50-programmer-phone-interview-questions-answers.html) for [telephone interviews](http://www.java67.com/2015/03/top-40-core-java-interview-questions-answers-telephonic-round.html) and these [books](http://javarevisited.blogspot.sg/2016/06/top-5-books-for-programming-coding-interviews-best.html) and [courses](http://javarevisited.blogspot.sg/2018/02/10-courses-to-prepare-for-programming-job-interviews.html) for more thorough preparation.\n\n### Now You’re Ready for the Coding Interview\n\nThese are some of the most common questions outside of data structure and algorithms that help you to do really well in your interview. \n \nI have also shared a lot of these questions on my [blog](http://java67.com/), so if you are really interested, you can always go there and search for them. \n \nThese common coding, [data structure, and algorithms questions](https://hackernoon.com/50-data-structure-and-algorithms-interview-questions-for-programmers-b4b1ac61f5b0) are the ones you need to know to successfully interview with any company, big or small, for any level of programming job. \n \nIf you are looking for a programming or software development job, you can start your preparation with this [list of coding questions](http://www.java67.com/2018/05/top-75-programming-interview-questions-answers.html). \n \nThis list provides good topics to prepare and also helps assess your preparation to find out your areas of strength and weakness. \n \nGood knowledge of data structure and algorithms is important for success in coding interviews and that’s where you should focus most of your attention.\n\n#### Resources to Prepare for Interviews\n\n1. [**Cracking The Code Interview**](http://www.amazon.com/Cracking-Coding-Interview-6th-Edition/dp/0984782850/?tag=javamysqlanta-20), by [Gayle Laakmann McDowell](https://medium.com/u/e21bc4f4525e)\n2. [Data Structures and Algorithms: Deep Dive Using Java](https://click.linksynergy.com/fs-bin/click?id=JVFxdTr9V80&subid=0&offerid=323058.1&type=10&tmpid=14538&RD_PARM1=https%3A%2F%2Fwww.udemy.com%2Fdata-structures-and-algorithms-deep-dive-using-java%2F)\n3. [From 0 to 1: Data Structures and Algorithms in Java](https://click.linksynergy.com/fs-bin/click?id=JVFxdTr9V80&subid=0&offerid=323058.1&type=10&tmpid=14538&RD_PARM1=https%3A%2F%2Fwww.udemy.com%2Ffrom-0-to-1-data-structures%2F)\n4. [Data Structure and Algorithms Analysis — Job Interview](https://click.linksynergy.com/fs-bin/click?id=JVFxdTr9V80&subid=0&offerid=323058.1&type=10&tmpid=14538&RD_PARM1=https%3A%2F%2Fwww.udemy.com%2Fdata-structure-and-algorithms-analysis%2F)\n\n#### My other articles you may like:\n\n* [10 Books to Prepare Technical Programming/Coding Job Interviews](http://www.java67.com/2017/06/10-books-to-prepare-technical-coding-job-interviews.html)\n* [10 Algorithm Books Every Programmer Should Read](http://www.java67.com/2015/09/top-10-algorithm-books-every-programmer-read-learn.html)\n* [Top 5 Data Structure and Algorithm Books for Java Developers](http://javarevisited.blogspot.sg/2016/05/5-free-data-structure-and-algorithm-books-in-java.html#axzz4uXETWjmV)\n* [My favorite free courses to learn Algorithms in depth](https://medium.freecodecamp.org/these-are-the-best-free-courses-to-learn-data-structures-and-algorithms-in-depth-4d52f0d6b35a)\n* [10 Free Data Structure Courses for Java Developers](http://www.java67.com/2019/02/top-10-free-algorithms-and-data.html)\n* [A list of courses to Crack Programming Job Interviews](https://hackernoon.com/10-data-structure-algorithms-and-programming-courses-to-crack-any-coding-interview-e1c50b30b927)\n* [10 Data Structure, Algorithms, and SQL Courses to Crack Coding Interview](https://hackernoon.com/10-data-structure-algorithms-and-programming-courses-to-crack-any-coding-interview-e1c50b30b927)\n\n### Closing Notes\n\nThanks, You made it to the end of the article … Good luck with your programming interview! It’s certainly not going to be easy, but by following this searching and sorting algorithm questions, you are one step closer than others. \n \nIf you like this article, then please share with your friends and colleagues, and don’t forget to follow [javarevisited](https://twitter.com/javarevisited) on Twitter and [javinpaul](https://medium.com/u/bb36d8439904) and [javinpaul](https://medium.com/u/bb36d8439904) here on [Medium](https://medium.com/u/504c7870fdb6) as well!\n\n> P.S. — If you need some FREE resources, you can check out this list of [**free data structure and algorithm courses**](http://javarevisited.blogspot.com/2018/01/top-5-free-data-structure-and-algorithm-courses-java--c-programmers.html) to start your preparation.