bbbuh

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/19

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

20 Terms

1
New cards

not in merge-sort

merge all the smaller arrays together

2
New cards

pass into variable to a method, method recieves

a copy of the variable

3
New cards

call recurMethod

g

ogr

rogra

program

4
New cards

What will be printed as a result of the call wackyPrinter("cpu")?

!!!!cpu!!!!

5
New cards

hamster

| only

6
New cards

unordered list of fifteen students

linear

7
New cards

What algorithm is shown?

Linear Search

8
New cards

What is returned as a result of the call goRound(56348)?

60000

9
New cards

What is returned by the method call recur(9)?

45

10
New cards

For which of the following values of word, will the call hasRepeat result in an error?

|||

11
New cards

Which of the following should be used to replace // Missing line in hasRepeatHelper so that hasRepeat

will work as intended?

if (pos < 1)

{

return false;

}

12
New cards

Which of the following are real advantages of using the merge-sort algorithm?

|| only

13
New cards

What is printed as a result of executing the statement System.out.println(recur(13))?

ttft

14
New cards

Which of the following best describes the value returned by the call mystery(x)?

The largest power of 2 which divides x evenly

15
New cards

What algorithm is this an implementation of?

Binary Search

16
New cards

What is printed as a result of the call doWhat(2)?

14 10 6 2

17
New cards

methods below are intended to implement the merge sort algorithm when used in conjunction.

merge(mergeSort(lowerHalf), mergeSort(upperHalf))

18
New cards

What value is returned as a result of the call recur(12)?

4

19
New cards

What is printed as a result of the call mystery("method")?

m

et

h

od

20
New cards

What will be the value of low when the line marked / insert new number / in the binaryInsert method is executed?

2