Javarevisited: How to Find All Permutations of String in Java using Recursion
▼ Friday, August 14, 2015 How to Find All Permutations of String in Java using Recursion How to find all permutation of a String using recursion is one of the tricky coding question from Programming job interviews. I have first seen this question in my college exam, when we were asked to code the solution using C or C++ language. Since then I have seen this question many times at various written tests and Java interviews for junior developer position. Its not only serve as a good question to check whether candidate understand recursion but also its one of the better Java programming exercise for beginners. Typically, you will be asked to write a method, which accepts a String and print all permutations or may be return all permutations in a List. Depending upon the company you are going for interview, they may ask you to code on IDE like Eclipse or NetBeans, or simply write code in plain paper, so be prepared for both. There are two main ways to solve this problem,Read full article from Javarevisited: How to Find All Permutations of String in Java using Recursion
No comments:
Post a Comment