Quizzes
Search
Take Quizzes
Animal
Nutrition
Love
Relationship
Computer
Sports
Society
Business
Geography
Language
Personality
Harry Potter
Movie
Television
Music
Online Exam
Health
Country
Art
Entertainment
Celebrity
Math
Game
Book
Fun
Science
Food
History
Education
All Topics
Create a Quiz
Quiz Maker
Training Maker
Survey Maker
Flashcards
Brain Games
See All
ProProfs.com
Search
Create A Quiz
Take Quizzes
Animal
Nutrition
Love
Relationship
Computer
Sports
Society
Business
Geography
Language
Personality
Harry Potter
Movie
Television
Music
Online Exam
Health
Country
Art
Entertainment
Celebrity
Math
Game
Book
Fun
Science
Food
History
Education
All Topics
Products
Quiz Maker
Training Maker
Survey Maker
Flashcards
Brain Games
See All
ProProfs.com
Quizzes
Quizzes
›
Computer
Dsa_3
10 Questions
|
By Lethao.2c08 | Updated: Mar 20, 2022
| Attempts: 136
Share
Start
Share on Facebook
Share on Twitter
Share on Whatsapp
Share on Pinterest
Share on Email
Copy to Clipboard
Embed on your website
Question
1
/ 10
0 %
0/100
Score
0/100
1.
Define a recursive function F( n ) as following: If n > 0 then F( n ) = n x F(n-1) If n = 0 then F( n ) = 1. As such, what is the value of F(5)?
5
120
15
1
Submit
Start Quiz
About This Quiz
2.
What's your name?
We’ll put your name on your report, certificate, and leaderboard.
2.
Which of the following stack operations could result in stack underflow?
Is_empty
Top
Pop
Push
Submit
3.
Which of the following is the appropriate statement concerning data sorting methods?
The “bubble sort” method determines an intermediate reference value and divides the elements into two groups of “larger” values and...
The “bubble sort” method determines an intermediate reference value and divides the elements into two groups of “larger” values and “smaller” values. This operation is then repeated recursively on these two groups.
The “shell sort” method repeatedly compares two adjacent elements and swaps them if the first element is larger than the...
The “shell sort” method repeatedly compares two adjacent elements and swaps them if the first element is larger than the second.
The “quick sort” method sorts each substring composed of elements extracted at regular intervals, and then the interval is further...
The “quick sort” method sorts each substring composed of elements extracted at regular intervals, and then the interval is further decreased and the same operation is performed again. This operation is repeated until the interval becomes 1.
The “heap sort” method builds an ordered tree from the unsorted portion of the elements, extracts the maximum or minimum...
The “heap sort” method builds an ordered tree from the unsorted portion of the elements, extracts the maximum or minimum value from this ordered tree, and moves it to the sorted portion. This operational sequence is then repeated to gradually shrink the unsorted portion.
Submit
4.
Which formula is the best approximation for the depth of a heap with n nodes?
The square of n
N
The number of digits in n (base 10)
Log (base 2) of n
Submit
5.
Given a tree T in the box. What is the order of nodes visited using a pre-order traversal?
X S Z Y R W P U T V
X Z Y S P W U V T R
R S X Y Z T U W P V
R S T X Y U V Z W P
Submit
6.
Suppose cursor points to a node in a linked list (using the node definition with member functions called data and link). What Boolean expression will be true when cursor points to the tail node of the list?
(cursor->link( ) == NULL)
(cursor->data( ) == NULL)
(cursor == NULL)
(cursor->data( ) == 0.0)
Submit
7.
Among Breadth-first search and Depth-first search, which graph traversal algorithm uses a queue to keep track of vertices that need to be processed?
Only Depth-First Search
Only Breadth-first search
Both Breadth-first search and Depth-first search
None of them
Submit
8.
Figure 2 is the array representation of a binary tree shown in Figure 1. What should be put into the space "a"?
2
3
4
5
Submit
9.
Consider the following pseudo code: declare a stack of characters while ( there are more characters in the word to read ) { read a character push the character on the stack } while ( the stack is not empty ) { write the stack's top character to the screen pop a character off the stack } What is written to the screen for the input "cartets"?
Ccaarrtteettss
Stetrac
Cartets
Serc
Submit
10.
Which of the following is an appropriate description concerning the list and/or array structures?
The list structure is similar to the array structure in that all data elements of the same type are sequentially...
The list structure is similar to the array structure in that all data elements of the same type are sequentially lined up. In the list structure, the logical arrangement is the same as the physical arrangement.
Using a subscript for each element in an array, quick access to any element can be achieved. The array structure...
Using a subscript for each element in an array, quick access to any element can be achieved. The array structure allows any data to be inserted or deleted simply by modifying pointers.
The list structure allows any data to be inserted or deleted simply by modifying pointers. But, after the data was...
The list structure allows any data to be inserted or deleted simply by modifying pointers. But, after the data was deleted, the cells that contained the data remain as garbage in memory.
The number of operations is fixed in inserting or deleting an element in an array; it does not depend on...
The number of operations is fixed in inserting or deleting an element in an array; it does not depend on the position of the element in the array.
Submit
View My Results
Related Quizzes
Tablet Quiz: What Tablet Should I Buy Quiz
Tablet Quiz: What Tablet Should I Buy Quiz
Thank you for your feedback!
Would you like to edit this question to improve it?
No thanks
Name:
Email:
Oops! Give us more information:
Incorrect Question
Incorrect Answer
Typos
I have a feedback
Submit
Please provide name and email to proceed.
Please provide correct email to proceed.
Please provide feedback.
Please select the option.
All (10)
Unanswered (
)
Answered (
)
Define a recursive function F( n ) as following:...
Which of the following stack operations could result in stack...
Which of the following is the appropriate statement concerning data...
Which formula is the best approximation for the depth of a heap with n...
Given a tree T in the box. What is the order of nodes visited using a...
Suppose cursor points to a node in a linked list (using the node...
Among Breadth-first search and Depth-first search, which graph...
Figure 2 is the array representation of a binary tree shown in Figure...
Consider the following pseudo code:...
Which of the following is an appropriate description concerning the...
X
OK
X
OK
Cancel
X
OK
Cancel
Back to top
Back to top
Advertisement