Algorithms and Data Structures
English
Intermediate
This is a Multiple Choice Questions (MCQs) based on Data Structures and Algorithms, where you will be given four options.
Description
35
Questions
30 sec
Per question
8:57
Average time
Disqualified
Contest Score
3.3
Community Rating
403
Participants
14 comments
Holy Duck judge
Thank you for taking the effort to submit your test for the contest.
Unfortunately, this test will not be able to receive a prize:

Not an original test. Some questions were copied from other sources. E.g.
#q1 "What will be the running-time of Dijkstra's single source shortest path algorithm, if the graph G(V,E) is stored in form of adjacency list and binary heap is used?" <= https://compscibits.com/Data-Structures-and-Algorithms/Graphs/discussion/4120
#q2 "Which of the following has search effeciency of Ο(1)?" <= https://compscibits.com/Data-Structures-and-Algorithms/Sorting-and-Searching/discussion/4070, etc.
Dark Dodo
Good quiz, it was interesting to solve.

Just a small remark, for some questions (Q17, Q23) about the operations with stack, 30 seconds is not enough.
Small Lizard
Questions about stack:

Consider you have a stack whose elements in it are as follows.
5 4 3 2 << top
Where the top element is 2. You need to get the following stack 6 5 4 3 2 << top The operations that needed to be performed are (You can perform only push and pop):
Your answer is Push(pop()), push(6), push(pop()).
pop() deletes and returns the top element of stack. push(x) adds element x to the top of stack. So push(pop()) simply does nothing with stack. This answer is incorrect.

What will be result if the given stack is popped?
S
E R
Your answer is S E R.
Here is the same, pop() returns the top element of stack, so result will be S.
Small Lizard
And one more question about stack:

If we're using a stack, what are the set of functions that are to be executed to get the following output?
cat
Your answer is push(c,s); pop(s); push(a,s); pop(s);push(t,s);pop(s);
What does s mean here?
Small Lizard
With what data structure can a priority queue be implemented?
Your answer is TREE, but explanation says that all options are correct and the best answer is HEAP.
Small Lizard
If a simple graph G, contains n vertices and m edges, the number of edges in the Graph G'(Complement of G) is ...?
There are two identical correct options
Small Lizard
The concatenation of two list can performed in O(1) time. Which of the following variation of linked list can be used?
Your answer is circular doubly linked list.
But doubly linked lists can also be concatenated in O(1).
Small Lizard
Which of the following sort algorithms keep two separate sub-lists?
Your answer is selection sort.
Merge sort divides list into TWO SEPARATE SUB-LISTS, sorts them separately and then merges them into one list.
Quick sort reorders list using pivot element, then divides list into TWO SEPARATE SUB-LISTS, and sorts them separately.
So all these answers are correct.
Small Lizard
Which of the following series is Non-Decreasing Order?
Your answer: 2, 4, 4, 5, 7, 9
Obviously, 2, 3, 4, 5, 6, 7 is correct answer too, it is Non-Decreasing Order: 2<=3<=4<=5<=6<=7.
Small Lizard
What is the worst case efficiency for a path compression algorithm?
What is the path compression algorithm?
Take the quiz to leave a comment