Search Header Logo

DS Quiz for 4th Sep.

Authored by Hriday Gupta

Computers

University

Used 1+ times

DS Quiz for 4th Sep.
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

6 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Consider an implementation of unsorted singly linked list. Suppose it has its representation with a head and tail pointer. Given the representation, which of the following operation can be implemented in O(1) time?

I.Insertion at the front of the linked list

II. Insertion at the end of the linked list

III.Deletion of the last node of the linked list

IV.Deletion of the front node of the linked list

I and II

I and III

I,II and III

I,II and IV

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What would be the asymptotic time complexity to add an element in the linked list?

O(1)

O(n)

O(n2)

None

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A variant of linked list in which last node of the list points to the first node of the list is?

Singly linked list

Doubly linked list

Circular linked list

Multiply linked list

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In doubly linked lists, traversal can be performed?

Only in forward direction

Only in reverse direction

In both directions

None

5.

FILL IN THE BLANK QUESTION

30 sec • 1 pt

According to today class discussion what should be filled at dotted position


while(ptr->next!=NULL)

{

printf("%d->",ptr->data);

.................................

}

6.

FILL IN THE BLANK QUESTION

10 sec • 1 pt

According to today class discussion what should be filled at dotted position


Hint:- In Create function


temp=(struct node *)malloc(sizeof(struct node));

printf("Enter data:");

scanf("%d",&x);

temp->data=x;

temp->next=NULL;

if(head==NULL)

head=...............................;

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?