private boolean formCircle(String input[], List<String> result,boolean used[],char firstChar){
        if(input.length == result.size()){
            String str = result.get(result.size()-1);
            if(firstChar == str.charAt(str.length()-1)){
                return true;
            }
            return false;
        }
        String str = result.get(result.size()-1);
        char lastChar = str.charAt(str.length()-1);
        for(int i=1; i < input.length; i++){
            if(used[i]){
                continue;
         
            }
            if(lastChar == input[i].charAt(0)){
                used[i] = true;
                result.add(input[i]);
                boolean r = formCircle(input,result,used,firstChar);
                if(r){
                    return true;
                }
                used[i] = false;
                result.remove(result.size()-1);
            }
            
        }
        return false;
    }
http://www.geeksforgeeks.org/given-array-strings-find-strings-can-chained-form-circle/
Test cases:
Empty input
1 element in input
no chain formed
chain formed
src/com/interview/recursion/ChainWordsToFormCircle.java