Quiz Sorting

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

1/22

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.

23 Terms

1
New cards

A Java method may have at most one vararg parameter and it must be the last one.

True

2
New cards

Insert Sort has a best case cost bounds given by O(n), namely some_constant*(n)

True

3
New cards

getopt command line parameters supports parsing groups of one character options starting with a dash

True

4
New cards

== check on arrays only succeeds if an array is checked against itself, as only addresses are compared.

True

5
New cards

The row i of a 2D ragged array of integers can be emptied with row\[i\] = new int\[0\]

True

6
New cards

Bubble Sort has a best case cost bounds given by O(n), namely some_constant*(n)

True

7
New cards

Recursive Fibonacci series are always implemented with two recursion calls in its body

False

8
New cards

charAt(0) is the first character of a string

True

9
New cards

The maximum number of dimensions that a Java array can have is theoretically unlimited (practically 225).

True

10
New cards

Variable declaration is the process of instructing the compiler on allocating space for a variable

True

11
New cards

Insert Sort has a worst case cost bounds given by O(n^2), namely some_constant*(n^2)

True

12
New cards

Bubble Sort has a worst case cost bounds given by O(n^2), namely some_constant*(n^2)

True

13
New cards

0< is used to redirect the standard input of a program from a file.

True

14
New cards

Bubble Sort can be implemented recursively

True

15
New cards

A for loop update section containing an “i++” behaves differently from one containing only a “++i”.

False

16
New cards

int\[\] A; A\[0\]=0; //does not create an array with the first element set to 0;

True

17
New cards

Insert Sort can be implemented recursively, in each recursion reducing the unsorted array by one value, which is added to the already sorted values.

True

18
New cards

equals() is a method used to test equality for class types

True

19
New cards

Bubble Sort best case is when the array is almost sorted already and only a few elements are before their sorted position in the array (in the direction of the bubbling).

True

20
New cards

The worst case costs of Insert Sort and Bubble Sort scale similarly with size, up to a constant ratio depending on machine 

True

21
New cards

Unidirectional Bubble Sort best case is  whenever the array is almost sorted already

False

22
New cards

The best case costs of Selection Sort, Insert Sort and Bubble Sort does scale similarly with size, up to some constant ratios that depend on machine and implementation.

False

23
New cards

Insert Sort best case is when the array is almost sorted already.

True