[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

NA
SHSTTON
826
Solv. Corr.
331
Solv. In. Corr.
1157
Attempted
0 M:3 S
Avg. Time

1 / 33

Choose the correct option.

In a linked list with n nodes, the time taken to insert an element after an element pointed by some pointer is

AO(1)

BO(log n)

CO(n)

DO(n1og n)

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
515
Solv. Corr.
165
Solv. In. Corr.
680
Attempted
1 M:34 S
Avg. Time

2 / 33

Choose the correct option.

For a doubly linked list does the following segment of code removes the element pointed to by X , if it is assumed that X points to neither the first nor the last
element in the list.
X->prev->next = X->next;
X->next->prev = X->prev; ?

ATRUE

BFALSE

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
212
Solv. Corr.
627
Solv. In. Corr.
839
Attempted
1 M:12 S
Avg. Time

3 / 33

Choose the correct option.

The following while loop is to remove duplicates from an existing list having a head pointer pointing to the first node.Which code will replace ____

while(current->next!=NULL)
{
if (current->data == current->next->data)
{
____
}
else
{
current = current->next;
}
} ?

Ap=current->next->next;free(current);current->next = p;

Bp=current->next;free(p);

Cp=current->next;free(current->next);current->next=p;

Dp= current->next->next;free(current->next);current->next = p;

Explanation:

ok

Workspace

NA
SHSTTON
516
Solv. Corr.
673
Solv. In. Corr.
1189
Attempted
0 M:32 S
Avg. Time

4 / 33

What does the following function return, if q contains the address of the first element?

int function(NODE *q)
{
int c = 0;
while( q != NULL)
{
c++;
}
return (c);
} ?

AThe value of the last node of the linked list

BThe value of the first elements of the linked list

DThe number of elements in a linked list

Explanation:

Consider list1 and list2 linked lists given below:

list1: 15 -> 18 -> 25 -> 30

list2: 11 -> 14 -> 17 -> 23 -> 32 -> 56

What will be the elements of the queue that is returned by the code snippet given below when list1 and list2 are passed as arguments to function, fun?

def fun(input_list1,input_list2):

output_queue = Queue(10)

while(temp1 != None and temp2 != None):

if(temp1.get_data() < temp2.get_data()):

output_queue.enqueue(temp1.get_data())

temp1 = temp1.get_next()

elif(temp1.get_data() > temp2.get_data()):

output_queue.enqueue(temp2.get_data())

temp2 = temp2.get_next()

else:

output_queue.enqueue(temp2.get_data())

temp1 = temp1.get_next()

temp2 = temp2.get_next()

while(temp1 != None):

output_queue.enqueue(temp1.get_data())

temp1 = temp1.get_next()

while(temp2 != None):

output_queue.enqueue(temp2.get_data())

temp2 = temp2.get_next()

return output_queue

Note: Order of displaying the queue elements is from front to rear.

Select one:

Workspace

NA
SHSTTON
844
Solv. Corr.
270
Solv. In. Corr.
1114
Attempted
0 M:8 S
Avg. Time

5 / 33

Choose the correct option.

The situation when in a linked list START=NULL is

AUnderflow

BOverllow

CHousefull

DSaturated

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
491
Solv. Corr.
625
Solv. In. Corr.
1116
Attempted
0 M:13 S
Avg. Time

6 / 33

Choose the correct option.

Afor relatively permanent collections of data

Bfor the size of the structure and the data in the structure are constantly changing

Cfor both of above situation

Dfor none of above situation

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
863
Solv. Corr.
114
Solv. In. Corr.
977
Attempted
0 M:4 S
Avg. Time

7 / 33

Choose the correct option.

Linked lists are best suited for

Arelatively permanent collections of data

Bthe size of the structure and the data in the structure are constantly changing

Cboth of above situation

Dnone of above situation

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
66
Solv. Corr.
229
Solv. In. Corr.
295
Attempted
0 M:5 S
Avg. Time

8 / 33

Choose the correct option.

Which of the following is not the properties of XOR lists?

AX⊕X = 0

B(X⊕Y)⊕Z = X⊕(Y⊕Z)

CX⊕0 = X

DX⊕0 = 1

ENone of these

Explanation:

The important properties of XOR lists are X⊕X=0 , X⊕0=X and (X⊕Y)⊕Z = X⊕(Y⊕Z).

Workspace

NA
SHSTTON
123
Solv. Corr.
167
Solv. In. Corr.
290
Attempted
0 M:17 S
Avg. Time

9 / 33

Choose the correct option.

What is a skip list?

Aa linkedlist with size value in nodes

Ba linkedlist that allows slower search within an ordered sequence

Ca linkedlist that allows faster search within an ordered sequence

Da tree which is in the form of linked list

ENone of these

Explanation:

It is a datastructure, which can make search in sorted linked list faster in the same way as binary search tree and sorted array (using binary search) are faster.

Workspace

NA
SHSTTON
80
Solv. Corr.
203
Solv. In. Corr.
283
Attempted
0 M:0 S
Avg. Time

10 / 33

Choose the correct option.

To which datastructure are skip lists similar to in terms of time complexities in worst and best cases?

Abalanced binary search trees

Bbinary trees

Cbinary search trees

ENone of these

Explanation:

Skip lists are similar to any randomly built binary search tree. a BST is balanced because to avoid skew tree formations in case of sequential input and hence achieve O(logn) in all 3 cases. now skip lists can gurantee that O(logn) complexity for any input.

Workspace

At Data Structures topic Linked Lists, you will get multiple online quiz difficulty wise, which will have a total of 6 quizzes, categorized as easy, medium, and moderate level. While preparing for any Linked Lists, take all the list quiz and check your preparation level for that topic. Each quiz have 10 different question, which needs to be answered in 20 min., all the listed quiz here is free, however, you will get only one chance for each quiz to attempt(Take Quiz seriously), so it is always recommended to take one quiz in each section before you start solving Linked Lists MCQs practice question, and one after solving all the question of the respective level, you can refer back your Linked Lists quiz result any time or you can download it as pdf for reference.

## Data Structures Linked Lists Quiz Online Test

The details of the Data Structures Linked Lists quiz are as follows. There are 10 questions for you. You have to answer them in 20 minutes. Within 20 minutes you have to see the errors in the sentences given as a question. Four options are also given to you, and you have to choose your opinion. You must be confident in your answer that the choices are difficult. Therefore, below we provide you with some information about Data Structures Linked Lists that you see and keep them in mind while answering questions.

On this Linked Lists section of page you will find the easiest quickest ways to solve a question, formulas, shortcuts and tips and tricks to solve various easiest methods to solve Linked Lists Question Quickly. It contains all the Data Structures topic Linked Lists questions which are common in any of the preliminary exams of any company. The solution is provided along with the questions. The practice of these questions is a must as they are easy as well as scoring and asked in all the exams They will confirm the selection if all the questions attempted wisely with little practice. It is recommanded to Take Mock test based on Data Structures topic and Linked Lists topic based quiz.