Font size
WorksheetsData Structures FCI
Total questions: 19
Worksheet time: 10mins
What is an Algorithm?
A picture that you use to make a program
A precise set of instructions
Shapes and symbols connected together
Breaking a problem down into smaller tasks
What is the time complexity of this function / algorithm?
Preguntemosle a Oscar
O(n^2)
O(n)
O(1)
O(log(n))
What is the time complexity of this function / algorithm?
O(n)
O(1)
O(nlog(n))
O(n^2)
Preguntemosle a Jhon
Difference Between array and calloc()
array: Size is fixed
calloc () : fixed size
array: Size is fixed & static
calloc () : fixed size & dynamic
array: Size is fixed & dynamic
calloc () : fixed size & dynamic
array: Size is fixed & static
calloc () : fixed size can be altered & dynamic
Static vs dynamic memory allocation
compile time,
run time
compile time
run time
None of the above
Which Allocation algorithms are best?
First fit
Worst Fit
Best Fit
Accessing top Element in stack is constant time Operation
TRUE
FALSE
Only top element can be accessed in stack
TRUE
FALSE
Stacks have LIFO ordering
TRUE
FALSE
Nested function calls form a stack
TRUE
FALSE
Which of them is an abstract data structure (ADT)?
A) Stacks
B) Queues
Both A and C
C) Functions
LIFO stands for
Last in First Out
First in Last Out
List of Outputs
None of them
Act of adding values into a stack is called
Popping
Pushing
Polling
None
Which of the following statement(s) about stack data structure is/are NOT correct?
Stack data structure can be implemented using linked list
New node can only be added at the top of the stack
The last node at the bottom of the stack has a NULL link
HIDE ANSWER
Stack is the FIFO data structure
If the elements “A”, “B”, “D” and “C” are placed in a stack and are deleted one at a time, in what order will they be removed?
ABCD
ABDC
CDBA
DCAB
Consider the following operation performed on a stack of size 5.
Push(1);
Pop();
Push(2);
Push(3);
Pop();
Push(4);
Pop();
Pop();
Push(5);
After the completion of all operation, the no of element present on stack are
1
3
2
4
