boolean findItineraryUtil(List<Itinerary> input, boolean[] used, String end, List<String> output, int count) {
        if (count == used.length) {
            output.add(end);
            return true;
        }
        for (int i = 0; i < input.size(); i++) {
            if (used[i]) {
                continue;
            }
            Itinerary itr = input.get(i);
            if (itr.start.equals(end)) {
                output.add(itr.start);
                used[i] = true;
                if (findItineraryUtil(input, used, itr.dest, output, count + 1)) {
                    return true;
                }
                used[i] = false;
                output.remove(output.size() - 1);
            }
        }
        return false;
    }
Date 03/08/2016
@author Tushar Roy

Reconstruct itinerary based on ticket.

https://leetcode.com/problems/reconstruct-itinerary/
src/com/interview/recursion/ReconstructItinerary.java