Data Structure(DS) Questions and Answers

Computer Science : Data Structure

This quiz consist of multiple choice questions of data structure for various exams point of view.
1. Which one of the following permutations can be obtained the output using stack assuming that the input is the sequence 1,2,3,4,5 in that order ?
[A] 3,4,5,1,2
[B] 3,4,5,2,1
[C] 1,5,2,3,4
[D] 5,4,3,1,2
Loading...
2. The initial configuration of the queue is a,b,c,d (a is the front end). To get the configuration d,c,b,a one needs a minimum of ?
[A] 2 deletions and 3 additions
[B] 3 additions and 2 deletions
[C] 3 deletions and 3 additions
[D] 3 deletions and 4 additions
Loading...
3. Linked list are not suitable data structure of which one of the following problems ?
[A] Insertion sort
[B] Binary search
[C] Radix sort
[D] Polynomial manipulation
Loading...
4. The number of possible ordered trees with three nodes A,B,C is?
[A] 16
[B] 12
[C] 6
[D] 10
Loading...
5. Which of the following algorithm design technique is used in the quick sort algorithm?
[A] Dynamic programming
[B] Backtracking
[C] Divide and conquer
[D] Greedy method
Loading...
6. The number of swapping needed to sort numbers 8,22,7,9,31,19,5,13 in ascending order using bubble sort is ?
[A] 11
[B] 12
[C] 13
[D] 14
Loading...
7. Which of the following statement is true ?
[A] Optimal binary search tree construction can be performed efficiently using dynamic programming.
[B] Breath first search cannot be used to find converted components of a graph.
[C] Given the prefix and post fix walks over a binary tree.The binary tree cannot be uniquely constructe
[D] Depth first search can be used to find connected components of a graph.
Loading...
8. Given two sorted lists of size m and n respectively.The number of comparisons needed in the worst case by the merge sort algorithm will be?
[A] mn
[B] max(m,n)
[C] min(m,n)
[D] m+n-1
Loading...
9. Merge sort uses ?
[A] Divide and conquer strategy
[B] Backtracking approach
[C] Heuristic search
[D] Greedy approach
Loading...
10. The following sequence of operation is performed on stack : push(1),push(2),pop,push(1),push(2),pop,pop,pop,push(2),pop. The sequence of popped out values are ?
[A] 2,2,1,1,2
[B] 2,2,1,2,2
[C] 2,1,2,2,1
[D] 2,1,2,2,2
Loading...

Are these questions helpful for you?



Comments: (Your feedback is valuable to us)

pankaj 2 weeks ago Reply

we want to more explanitions


NARENDRA KUMAR 2 months ago Reply

and want to more explanation two dimensional array also


NARENDRA KUMAR 2 months ago Reply

we want to more explanation about stack and queue


HIFZURRAHAMAN 1 year ago Reply

Add atleast 100 questions.........


Rituraj 1 year ago Reply

Need explanation as well


keerthana g 1 year ago Reply

Its useful, but I need explanation for each one.


Rehan 1 year ago Reply

nice questions to study.....


Avdhoot 2 years ago Reply

we want the more explanations


devi bala 2 years ago Reply

to give breif explanation


Shraddha 2 years ago Reply

nice questions to study.....


Davinder singh 2 years ago Reply

Thanks for questions really helpful for competitive exams...:)