Q 1. Write a Java method that repeatedly selects and removes a random entry from an array until the array holds no more entries.
Q 2. Give an implementation of the size( ) method for the SingularlyLinkedListclass, assuming that we did not maintain size as an instance variable.
Q 3. Give an implementation of the size( ) method for the CircularlyLinkedListclass, assuming that we did not maintain size as an instance variable.
Q 4. Give an implementation of the size( ) method for the DoublyLinkedListclass, assuming that we did not maintain size as an instance variable. For each of above problem, please define your own main method to demonstrate that your Java method is working properly.