Topic — Add New » Posts Last Poster Freshness
Microsoft Interview Question for Software Engineer/Developer (Fresher) about Linked Lists 1 jyoti 4 months

Implement the function : node * add(node *l1, node *l2). The lists L1 and L2 are linked lists where each node of the linked list contains a single hexadecimal digit, represented as a char. The whole list thus represents a hexadecimal number. We had to add the two hex numbers represented in l1 and l2, and return the head of the linked list representing the answer.

Microsoft
Amazon Interview Question for Software Engineer/Developer (Fresher) about Linked Lists 4 mdmobashir 4 months

swap adjacent nodes of given linked list using one pointer

Amazon
Recursively reverse 2 kartik 4 months

Give an efficient algorithm to RECURSIVELY reverse a singly linked list with minimum time and space complexity

Microsoft Interview Question for Software Engineer/Developer (Fresher) about Linked Lists 2 Aashish Barnwal 4 months

ROUND 3 :

1.Do the same merging of linked list recursively if an iterative solution was given in round 2 or the other way.

Microsoft
Microsoft Interview Question for Software Engineer/Developer (Fresher) about Linked Lists 6 Aashish Barnwal 4 months

ROUND 2 :

1.Write a function that returns the result of merging two sorted linked lists . And find the time complexity of your proposed solution .

Microsoft
Reversing doubly linked list 5 camster 4 months

Give an algorithm to reverse a doubly linked list in less than linear time

Reversing doubly linked list 2 kartik 5 months

Give an algorithm to reverse a doubly linked list in less than linear time

sorted insert for a circular linked list 3 k53 5 months

write a function that inserts a node in a circular linked list. The function should insert the node in a sorted way, i.e., if the linked list 1 6 7 and the element to be inserted is 4 then the list after insertion should become 1 4 6 7.

FlipKart Interview Question for Software Engineer/Developer (Fresher) about Algorithms, Data Structu 8 Gaurav 5 months

Given The Linked List remove the all duplicates elements from it while order should be maintained i mean 3-1-2-1-2 so o/p should be 3-2-1 e.g order of linked list shouldn't be broken & we have to
return the original linked list without duplication

Only O(N) or strictly less then O(N^2) Solution Required.

FlipKart
Microsoft Interview Question for Software Engineer/Developer (Fresher) about Linked Lists 5 5 months

Given two numbers represented by two linked lists as follows:

head1->1->2->3->4 (1234)
head2->7->2->1 (721)

write a function which returns difference of two numbers.
the function prototype will be : node *getdiff(node *head1, node *head2)

Microsoft
Create Linked Lists of all levels of a given binary tree 2 WgpShashank 5 months

print elements of every level in binary tree
it should be form link list
for ex; 5
/ \
3 4
/ \ / \
6 7 8 9
then 5
3->4
6->7->8->9 it is not bst

[closed] copy the list 3 k53 5 months

Given a doubly linked list where
1. one link points to it’s next neighbour
2. Other link points to some random node in the list(could also point to NULL)
Write an algorithm to make a copy of this list

[closed] Oracle Interview Question for Software Engineer/Developer about Linked Lists 5 kartik 5 months

I have been asked what seemed like a fairly simple question. Question is to write a prototype and algo for a function for deleting a node in a linked list, but with following constraints:

1) You accept pointer to the start node as first parameter and item to be deleted as second parameter. start node is not global
2) You WILL NOT be returning pointer to the start node.
3) You WILL NOT be accepting a pointer to pointer to start node.

My answer was to store the data i...

Oracle
Microsoft Interview Question for Software Engineer/Developer about Linked Lists, Trees 5 Gopi 6 months

Create a singly linked list from the Leaf nodes from a binary tree. Tree may be balanced or not. Linked List should be created in place (tree nodes should be used)

Microsoft
Split list into two lists 3 camster 6 months

How to splits list into two sublists at the specified position ?!

Amazon Interview Question for Software Engineer/Developer about Linked Lists 7 NinjaCoder 6 months

The numbers are represented in linked-list with each node representing a digit of the number as follows: 123 == 1 2 3 NULL, 999 == 9 9 9 NULL

Write a C program to add two numbers.

I/P : 9 9 9 NULL, 1 NULL

O/P : 1 0 0 0 NULL

Amazon
Addition of Large Numbers in the form of linked list 5 6 months

Given two linked lists, each contains a number in the form of linked list.
Example:
A: 1 -> 9 -> 7 -> 5
B: 7-> 9-> 2-> 6-> 7-> 1

You need to add these two numbers. Result should be stored in these nodes only. (i.e. you should not create extra nodes.)