//Question 7
Write a recursive, linear/sequential search that looks at the last entry of an array first.
The data is not sorted.
Segment 18.6 shows this array looking at the first entry of the array first. You can use this as a model.
The method header is:
public boolean searchRecursiveLinearFromLast(Object[] array, Object target)
//Question 8
Write a recursive, linear/sequential search that takes advantage of an array being sorted.
The data is sorted.
Question 18.2 in the textbook gives a more complete description of how to optimize the search.
The method header is:
public boolean searchRecursiveLinearSorted(Comparable[] array, Comparable target)
//Question 9
Write a method to return a list of all indices where a target appears.
The data is unsorted and could contain duplicates.
Your method can be iterative or recursive.
The method header is:
public ArrayList<Integer> findIndicesUnsorted(Object[] array, Object target)
//Question 10
sortedList is an object of type SortedListInterface that holds Integers. What is the contents of sortedList after each statement below?
[login to view URL](8); // a. what is the contents of the list?
[login to view URL](2); // b. what is the contents of the list?
[login to view URL](7); // c. what is the contents of the list?
[login to view URL](3); // d. what is the contents of the list?
[login to view URL](6); // e. what is the contents of the list?
[login to view URL]([login to view URL]()); // f. what is the output?
[login to view URL]([login to view URL](3)); // g. what is the output?
[login to view URL]([login to view URL](5)); // h. what is the output?
[login to view URL](3); // i. what is the contents of the list? (note: this is the remove(T) method)
//Question 11
Write a contains method for a linked implementation of a sorted list.
This method is written from the implementation perspective, meaning it goes inside of the SortedLinkedList class.
This means you have access to firstNode and numberOfEntries.
The method header is:
public boolean contains(T anEntry)
For full credit, write an efficient solution.
This will involve directly accessing the linked structure rather than only invoking existing methods.
You should also take advantage of the knowledge that the list is always sorted.
You can assume T is Comparable.
//Question 12
Write a method from the client perspective to find the mode of a SortedListInterface object.
The mode of a list of values is the value that has the greatest frequency (occurs the most).
The method header is:
public int getMode(SortedListInterface<Integer> sList)
For full credit, write an efficient solution (O(n )).
We are PR Technologies. We have a team of experienced Java developers, who works together and contribute to Develop Quality Products.
So, if you show some trust, then we will guaranteed for a Best products.
Thanks & Regards
Pr technology
Hey there,
I have read your job description and i am very confident about doing this project.
Let me introduce myself, My name is Sumit Kumar and have done my Engineering from University of South Carolina. I am a very good designer and developer with an experience of more than 8 years.
I have an experience in following technologies:
1. C, C++
3. Java, JavaFX, J2EE
4. Android
5. XML
6. Mobile Applications Development
My main motive here is to deliver quality services. I am available 24*7 and time zone flexible.
Hoping for your positive reply
Thanks