Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

LINKEDLIST: ITEM : SORTEDLINKEDLIST: Document1 - Word Picture Tools Sign in -0 ×

ID: 3736895 • Letter: L

Question

LINKEDLIST:

ITEM :

SORTEDLINKEDLIST:

Document1 - Word Picture Tools Sign in -0 × Insert Design Layout References Mailings Review View Help Format Tell me what yount to do Jp IAaBbCcDReplace Copy Paste Normal T No Spac.. Heading1 Heading 2 Title Subtitle Subtle Em.... Emphasis Select Fonmat Painter Clipboard Font Paragraph Styles Editing Document Recovery Word has recovered the following files Save the ones you wish to keep. Document1 [AutoRecovered] Version created from the last... 3/22/2018 4:56 PM 1) Consider the LinkedList class provided in the tutorial Write an instance method in the LinkedList class called isinincreasingÖrderO which returns a boolean indicating whether or not the data in the list is in increasing order. The method must be recursive. makes sense to have a directly recursive method that takes, as a parameter, an Item in the list and checks the remaining tems after it. You will need to check to make sure that there is at least one Item in the list belore caling the recursive method Below are some examples and the expected resuits. Use the SortedListTestProgram to test your results to make sure that your method works properly TRUE null TRUE nul TRUE null 14 FALSE 14 null 21 FALSE 10 null 21 23 TRUE null 98nul 23 76 Close Page 1 of 2 0 words + 100%

Explanation / Answer

public boolean isInIncreasingOrder() { boolean flag = true; if(head == null && tail == null) return flag; if(head == tail && (head.next == null && tail.next == null)) return flag; Item cur = head; while(cur != null) { if(cur.data