stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Data Structure Flashcards | StudBud
Explore
/
Data Structure
Data Structure
46 terms
·
StudBud Administration
·
9 plays
Algorithm, Flowchart
Flashcards
46 cards
F
Practice quiz
P
Host live
L
Questions
46
Answers
1
You can replace any element position in the stack.
True
False
2
Which of the following is TRUE about pseudocode?
It cannot be compiled.
It is harder to write than making flowcharts.
It cannot be modified
It can be compiled in any language you use.
3
Which of the following uses standard symbols for input, output, decisions and start and stop statement?
Flowchart
Algorithm
Pseudocode
4
Which method is used to maintain the Heap Property
Min Heap
Build_Max_Heap
Heapify (Operation)
5
Pseudocode uses reserved keywords like if-else, for, while, etc.
False
True
6
What does the Rhombus illustrate in a flowchart?
Beginning and end points
Actions
Connects symbols to show the direction of flow of action
Yes/No or True/False questions
7
Which of the following statement(s) about stack data structure is/are NOT correct?
Stack is the FIFO data structure
Stack data structure can be implemented using linked list
The last node at the bottom of the stack has a NULL link
New node can only be added at the top of the stack
8
The 2 properties of a min heap are _____.
Tree must be full.
Tree must be complete.
Node values are always greater than their children's values.
Node values are always smaller than their children's values.
9
Which of these is a standard way to write pseudocode loop expressions?
DO … OR DONOT
KEEP GOING UNTIL … THIS CONDITION
FOR … ENDFOR
LOOP … STOPLOOP
10
Evaluates to the remainder
Subtraction
Division
Multiplication
Mod
11
Which of the following are min heaps? (More than one right answer)
A
C
B
D
12
The process of solving problems using a series of steps.
analyzing
algorithmic
processing
creative thinking
13
operat on stack of size 5 : Push (a); Pop() ; Push(b); Push(c); Pop(); Push(d); Pop();Pop(); Push (e) which is correct?
Underflow occurs
Overflow occurs
Stack operations are performed smoothly
None of the above
14
What are Stacks Used For?
To keep track of a sequence of operations
To stack information
Type in data from keyboard
To remove data
15
Descending priority queue can be implemented using ______
min heap
min-max heap
none of these
max heap
16
A diag. that rep. an algor., work flow, or process and uses symbols connected by arrows to show dir. of flow of action.
Information
Illustration
Data
Flowchart
17
Seq of oper push(1),push(3),pop,push(2),push(2),pop,pop,pop,push(3),pop are perform on stack the order of popped value
1, 3, 2, 2, 3
3, 2, 1, 3, 2
3, 2, 2, 3, 1
2, 3, 2, 3, 1
18
What does the Arrow illustrate in a flowchart?
Move to the next step
Yes/No or True/False questions
Actions
Beginning and end points
19
What do computer programs generally try to solve and how?
try to solve poorly-defined problems using well-defined algorithms
try to solve well-defined problems using poorly-defined algorithms
try to solve math problems using only plain English
generally try to solve a well-defined problem using well-defined algorithm
20
Min heap can be used to implement selection sort?
True
False
21
One of the important considerations when writing pseudocode is to _____.
write everything in a paragraph
a.specify a programming language
write only a portion of the program that is important
write only one statement per line
22
What does the Oval illustrate in a flowchart?
Connects symbols to show the direction of flow of action
Beginning and end points
Yes/No or True/False questions
Actions
23
what is the value of x of the following expressionx <- 8 / 4 + 5 * 4 - 7 MOD 4
17
19
9
18
24
A command that performs different actions depending on whether a condition is true or false.
decomposing
flowcharting
algorithm
conditional statement
25
There are certain rules for writing pseudocode.
False
True
26
_____ algorithms are more complex algorithms that include decision making based on TRUE/FALSE or YES/NO questions.
Conditional
Linear
27
Why do we write in pseudocode?
Pseudocode can be executed on a computer
Pseudocode is a secret tradition
Easier to convert the algorithm from natural lang. to computer instructions
It is required for submission to game companies
28
The most used flow patterns, _________ is a set of instructions or steps you do until job is completed.
algorithm
event
program
iterations
29
What does the Rectangle illustrate in a flowchart?
Connects symbols to show the direction of flow of action
Beginning and end points
Actions
Yes/No or True/False questions
30
When removing the root from a min heap, what is the first step?
Repl the root with leaf furthest to right on the bottom level of the tree
Repl the root with leaf furthest to the left on bottom level of the tree
Replace the root with the smallest of its children
Replace the root with the next smallest value from the tree
31
An important use of heap data structure is _____.
priority queue
building databases
indexing databases
storing routing tables
32
Simplest of all flow patterns, one command follows the other.
Program
Sequencing
Algorithm
flowchart
33
This flowchart represents a ____ algorithm for assigning students to buses. What is this algorithm?
Conditional
Linear
34
When adding a value to a min heap, the first step is to ______.
Add the new node at the next open leaf.
Replace the root's value with the new value.
Replace the roots smallest child with the new value.
Add the new node as far right as possible on the bottom level of the tree.
35
In which heap the root node must be smallest among the keys present at all of it’s children?
None of the above
Both A and B
max-heap
min-heap
36
Define Pseudocode...
Is a step-by-step desc of a algorithm in code-like structure using Eng text
A Pseudocode is pictorial representation of flow of an algorithm.
Used to give an ans to a specific problem in a well-defined step-based form
37
There are no rules to writing algorithms
False
True
38
Given an array of elements 5,7,9,1,3,10,8,4 what is the sequence after inserting all elements in a min heap?
1,3,7,4,8,5,9,10
1,3,4,5,7,8,9,10
1,3,4,5,8,7,9,10
1,4,3,9,8,5,7,10
39
Heap can be used as ________________
Priority queue
Normal Array
Stack
A decreasing order array
40
Consider the foll operat performed on stack of size 5.
Push(1);Pop();Push(2);Push(3);Pop();Push(4);Pop();Pop();Push(5);
2
1
4
3
41
A _____is a finite sequence of well defined instructions that can used to solve computational problem.
Heap
Algorithm
Flowchart
Queue
42
In which heap the root node must be greatest among the keys present at all of it’s children?
Both A and B
None of the above
min-heap
max-heap
43
What will the stack contain after the following actions? Push(1); Push(2); Push(3); Push(4); Pop(); Pop(); Push(5)
1, 2, 5
1, 2, 3, 5
1, 2, 3, 4
1, 2, 3
44
stack colours={"red" , "green" , "blue"} After operations pop(), pop(), push("black") what does stack colors look like?
{"black" , "red"}
{"blue" , "black"}
{"red" , "black"}
{"red", "green" , "black"}
45
Define Algorithm...
Is a step-by-step desc of a algorithm in code-like structure using Eng text
Is a pictorial representation of flow of an algorithm.
Used to give an ans to a specific problem in a well-defined step-based form
46
Define Flowchart...
Is a pictorial representation of flow of an algorithm.
Is a step-by-step desc of a algorithm in code-like structure using Eng text
Used to give an ans to a specific problem in a well-defined step-based form