[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.

Placement Questions & Answers :: Sopra Steria

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

Answer: O(1)

Explanation:

Here is no explanation for this answer

Workspace

Tags:

Sopra Steria Societe Generale 

12. Consider a linked list of n elements. What is the time taken to insert an element after an element pointed by some pointer?

Answer: O(1)

Explanation:

Here is no explanation for this answer

Workspace

Tags:

Sopra Steria Societe Generale SAP Labs 

13. The time required to delete a node x from a doubly linked list having n nodes is

Answer: O(1)

Explanation:

Here is no explanation for this answer

Workspace

Tags:

Sopra Steria SAP Labs 

14. Analyse this structure and choose the correct option.

typedef struct node_s
{
struct node_s * prev;
struct node_s * next;
} node_t ; ?

Answer: A linking error would occur because no data is present

Explanation:

Here is no explanation for this answer

Workspace

Tags:

Sopra Steria Capgemini 

15. 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 ____

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

Answer: p= current->next->next;free(current->next);current->next = p;

Explanation:

Here is no explanation for this answer

Workspace

Tags:

Sopra Steria 

16. int function(NODE *q)
{
int c = 0;
while( q != NULL)
{
q = q->link;
c++;
}
return (c);
} ?

Answer: The number of elements in a linked list

Explanation:

Here is no explanation for this answer

Workspace

Tags:

Sopra Steria Capgemini 

17. Linked lists are best suited

Answer: for the size of the structure and the data in the structure are constantly changing

Explanation:

Here is no explanation for this answer

Workspace

Tags:

Sopra Steria Capgemini 

18. How is linked list implemented

Answer: Referential Structures

Explanation:

Here is no explanation for this answer

Workspace

Tags:

Cisco Sopra Steria Capgemini 

19. Skip lists are similar to which of the following datastructure?

Answer:

Explanation:

Skip lists have the same asymptotic time complexity as balanced binary search tree. For a Balanced Binary Search Tree, we skip almost half of the nodes after one comparison with root element. The same thing done in the skip lists. Hence skip lists are similar to balanced Binary search trees.

Workspace

Tags:

Sopra Steria Capgemini 

20. What does a xor linked list have ?

Answer:

Explanation:

Every node stores the XOR of addresses.

Workspace

Tags:

Sopra Steria