Select three methods in the object List class to work throug
     Select three methods in the object List class to work through algorithmically. Describe any special cases or boundary conditions that might exist for each of the three methods selected. Be sure to draw pictures as you work through the methods. Remember that you cannot work on linked lists without drawing pictures. The homework will not be accepted without submitting the pictures!  Write a java method with the signature:  that accepts two unordered linear linked lists and returns a third linear linked list whose nodes contains the intersection of the original linear linked lists. Note that the intersection of two lists is a new list containing the elements that the two list have in common, without modifying the two original lists. Describe any boundary conditions that might exist.   
  
  Solution
publlic List intersect (List list1, List list2){
Map<Object,Integer> list1_map = new HashMap<Object,Integer>();
List list3 = new ArrayList();
for(Object obj : list1){
list1_map.put(obj,1);
}
for(Object obj2 : list2){
if(list1_map.get(obj2)!=null &&list1_map.get(obj2)==1){
list3.add(obj2);
list1_map.put(obj2,-1);
}
}
return list3;
}
//replace object with Integer/String according to requirement.

