Texts: Part II: Programming Part 1. (20 points) Write a logarithmic Java method with the following signature that gets two equal-sized sorted arrays of integers and returns the median of the union of the two lists. The median of a sorted list with an even length is defined as the average of the two middle elements in the list.
public static double findMedian(int[] list1, int[] list2)
Ex: Given list1: [3, 5, 8, 9], list2: [2, 6, 10, 12], the median is the average of 6 and 8, which is (6+8)/2 = 7.
2. (30 points) Given the DisjointSet class, write a Java method that receives the following four input parameters and outputs a Boolean determining whether you can go from the source island to the destination island by using zero or more bridges:
String[] names of islands
HashMap<String, List<String>> bridges that represent the bridges connecting each island to other islands
String source island
String destination island
3. (30 points) Using the implementation of topological sort, write a Java method that gets the name of the prerequisites.txt file and prints a sequence of courses that can be taken by a student in order to graduate without violating any prerequisite requirements.