Quiz Methods-Arrays

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

1/11

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.

12 Terms

1
New cards

What does a stack frame contain in programming?

The values of non-static local variables and parameters.

2
New cards

What is recursion in programming and mathematics?

A tool used for solving problems by having a function call itself.

3
New cards

Are recursive methods always more efficient than non-recursive methods?

No, recursive methods are not always more efficient.

4
New cards

In recursive mathematical definitions, must all recursive references be on larger values?

No, they will not always be on larger values as eventually it reaches the base case.

5
New cards

What is placed on the run-time stack whenever a method is called?

A stack frame (also known as a stack allocation record).

6
New cards

What is a key characteristic of a correctly written recursive Java method?

It typically has at least one base case.

7
New cards

What is tail recursion?

When the recursive call is the last operation of a method.

8
New cards

Why is recursion often used in programming?

Because it is easier for humans to think with it.

9
New cards

Why is Select Sort considered inefficient?

Because it does not exploit already sorted sequences.

10
New cards

Can SelectionSort be implemented recursively?

Yes, SelectionSort can be implemented recursively.

11
New cards

Is the recursive Fibonacci series always implemented with two recursion calls?

No, it is not always implemented with two calls; there exist versions with one call.

12
New cards

What are the cost bounds for Binary Search?

Given by O(log n), specifically some_constant*log(n).