private boolean matchJobs(Integer candidate, Map<Integer,List<Integer>> jobApplications,Map<Integer,Integer> match,Set<Integer> jobsSeen){
    
        for(int job : jobApplications.get(candidate)){
            if(jobsSeen.contains(job)){
                continue;
            }
            jobsSeen.add(job);
            
            if(match.get(job) == null){
                match.put(job, candidate);
                return true;
            }
            boolean flag = matchJobs(match.get(job),jobApplications,match,jobsSeen);
            if(flag){
                match.put(job, candidate);
                return true;
            }
        }
        return false;
    }
http://www.geeksforgeeks.org/maximum-bipartite-matching/
src/com/interview/graph/MaximumBiparteMatching.java