Stack Operations and Recursion Concepts

Stack Operations and Recursion Concepts

Assessment

Flashcard

Computers

University

Hard

Created by

Quizizz 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?

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

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

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?