Vidyalelo
Data Structure · all questions

Introduction to Data Structures
practice.

Practice every MCQ with options. Use Show answers when you want the correct option and solution.

210

Questions

3/11

Page

Pick an option on a question to see the right answer and solution.

What is the primary characteristic of a stack?

Select an option to see the answer and solution.

What is the average-case time complexity of binary search?

Select an option to see the answer and solution.

Which of the following data structures does not allow duplicates?

Select an option to see the answer and solution.

Which of the following is a disadvantage of an array over a linked list?

Select an option to see the answer and solution.

Which data structure is used to check for balanced parentheses in an expression?

Select an option to see the answer and solution.

Which of the following is not an application of priority queue?

Select an option to see the answer and solution.

Making the push operation costly, select the code snippet which implements the pop operation.

Options are not available for this question.

Select an option to see the answer and solution.

What does the following Java code do?
public Object function()
{
	if(isEmpty())
	return -999;
	else
	{
		Object high;
		high = q[front];
		return high;
	}
}

Select an option to see the answer and solution.

What is not a disadvantage of priority scheduling in operating systems?

Select an option to see the answer and solution.

What is a dequeue?

Select an option to see the answer and solution.

Entries in a stack are "ordered". What is the meaning of this statement?

Select an option to see the answer and solution.

In linked list implementation of a queue, from where is the item deleted?

Select an option to see the answer and solution.

What is the space complexity for deleting a linked list?

Select an option to see the answer and solution.

Which of the following is not the type of queue?

Select an option to see the answer and solution.

What is the functionality of the following piece of code?
public Object delete_key() 
{
	if(count == 0)
	{
		System.out.println("Q is empty");
		System.exit(0);
	}
	else
	{
		Node cur = head.getNext();
		Node dup = cur.getNext();
		Object e = cur.getEle();
		head.setNext(dup);
		count--;
		return e;
	}
}

Select an option to see the answer and solution.

Consider a small circular linked list. How to detect the presence of cycles in this list effectively?

Select an option to see the answer and solution.

If the elements "A", "B", "C" and "D" are placed in a stack and are deleted one at a time, what is the order of removal?

Select an option to see the answer and solution.

Which of the following sorting algorithms can be used to sort a random linked list with minimum time complexity?

Select an option to see the answer and solution.

What kind of linked list is best to answer questions like "What is the item at position n?"

Select an option to see the answer and solution.

What is the time complexity of inserting at the end in dynamic arrays?

Select an option to see the answer and solution.