Stack Operations and Recursion Concepts

Stack Operations and Recursion Concepts

Assessment

Flashcard

Computers

University

Practice Problem

Hard

Created by

Wayground Content

FREE Resource

Student preview

quiz-placeholder

13 questions

Show all answers

1.

FLASHCARD QUESTION

Front

What is the base case in recursion?

Back

A condition to end the recursive calls

2.

FLASHCARD QUESTION

Front

A recursive function must always have a base case.

Back

True

3.

FLASHCARD QUESTION

Front

What will be the output of the code?

Media Image

Back

10

4.

FLASHCARD QUESTION

Front

Which of the following operations are supported by a stack? Insert and Delete, Enqueue and Dequeue, Push and Pop, Add and Remove

Back

Push and Pop

5.

FLASHCARD QUESTION

Front

What will be printed by the code? Answer in format "num, num" Example: 1, 1

Media Image

Back

30, 20

6.

FLASHCARD QUESTION

Front

What is the time complexity for searching an element in a balanced BST?

Back

O(log n)

7.

FLASHCARD QUESTION

Front

A binary tree is a BST if for every node, the value of all nodes in its left subtree is less than the node, and the value of all nodes in its right subtree is greater.

Back

True

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?

Discover more resources for Computers