Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged linked-list
1
votes
1
answer
151
Linked List
How D) could be answer here? I think for head->next=temp; will not work properly. Am I doing any mistake?
How D) could be answer here?I think for head->next=temp; will not work properly. Am I doing any mistake?
srestha
924
views
srestha
asked
Jan 26, 2018
DS
linked-list
data-structures
+
–
4
votes
0
answers
152
Linked List
N items are stored in a sorted doubly linked list. For a delete operation, a pointer is provided to the record to be deleted. For a decrease-key operation, a pointer is provided to the record on which the operation is to be performed. An algorithm performs the following ... (C) O(N2) (D) Θ(N2 Log N) Doubt : What is decrease key? Decreasing the value? and answer to the question.
N items are stored in a sorted doubly linked list. For a delete operation, a pointer is provided to the record to be deleted. For a decrease-key operation, a pointer is p...
gauravkc
756
views
gauravkc
asked
Jan 18, 2018
Programming in C
linked-list
data-structures
+
–
3
votes
2
answers
153
Linked List
Which of the following is worst choice to sort a linked list? a)Merge Sort b) Quick Sort c) heap sort d) Insertion sort
Which of the following is worst choice to sort a linked list?a)Merge Sortb) Quick Sortc) heap sortd) Insertion sort
srestha
3.1k
views
srestha
asked
Jan 17, 2018
DS
linked-list
data-structures
+
–
3
votes
1
answer
154
Data Structure
The minimum size of queue required when performing BFS on above graph is ________. (Size of queue is represented by maximum number of element at any time). I am getting 3. Consider 3 dimensional Array A[90] [30] [40] stored in linear array in column major order. If ... [20] [30] is ________. (Assume the first element is stored at A[1][1][1] and each element take 1 memory location)
The minimum size of queue required when performing BFS on above graph is ________.(Size of queue is represented by maximum number of element at any time).I am getting 3.C...
Shubhanshu
958
views
Shubhanshu
asked
Jan 9, 2018
Programming in C
data-structures
algorithms
linked-list
+
–
2
votes
0
answers
155
What will be the output of this C program
What will be the output of following programs : void fun1(struct node* head) { for(head == NULL) { return; } fun1(head->next); printf("%d ", head->data); } And this one ! void fun1(struct node* head) { while(head == NULL) { return; } fun1(head->next); printf("%d ", head->data); }
What will be the output of following programs :void fun1(struct node* head) { for(head == NULL) { return; } fun1(head->next); printf("%d ", head->data); } And this one ! ...
_shashi
1.8k
views
_shashi
asked
Jan 8, 2018
Programming in C
programming-in-c
linked-list
+
–
1
votes
1
answer
156
Linked list
In a circular single linked list how many external pointers are there because in some books there are two external pointers start pointing at first node and last pointing at last node while some given only last pointer and some have only first pointer
In a circular single linked list how many external pointers are there because in some books there are two external pointers start pointing at first node and last pointing...
kd.....
968
views
kd.....
asked
Dec 30, 2017
DS
linked-list
data-structures
programming-in-c
algorithms
+
–
–1
votes
0
answers
157
Linked_list
Insertion at beginning and end ....both require theta(n) ?
Insertion at beginning and end ....both require theta(n) ?
Pawan Kumar 2
314
views
Pawan Kumar 2
asked
Dec 21, 2017
Programming in C
linked-list
+
–
0
votes
2
answers
158
Ace Test Series: Programming & DS - Linked Lists
What is the time complexity to insert a new Node in a singly circular linked list at Starting ? (Number of nodes in list = N) A. O(1) B. O(N)
What is the time complexity to insert a new Node in a singly circular linked list at Starting ? (Number of nodes in list = N)A. O(1)B. O(N)
Mr_22B
2.4k
views
Mr_22B
asked
Dec 10, 2017
Programming in C
ace-test-series
linked-list
data-structures
+
–
1
votes
1
answer
159
Linked list doubt previous year question
The following C function takes a single-linked list of integers as a parameter and rearranges the elements of the list. The function is called with the list containing the integers 1, 2, 3, 4, 5, 6, 7 in the given order. What will be the contents of the list after ... ;value = temp; p = q ->next; q = p? p ->next : 0; } } What is meant by line 1?
The following C function takes a single-linked list of integers as a parameter and rearranges the elements of the list. The function is called with the list containing th...
hem chandra joshi
806
views
hem chandra joshi
asked
Dec 9, 2017
Programming in C
linked-list
+
–
1
votes
1
answer
160
linked lists and bit vectors
Consider the following statements about free space management I) Bit vectors are inefficient unless the entire vector is kept in main memory. II) Linked list approach requires less I/O time. III) Linked list approach is more efficient than bit vectors in terms of storage space. Which of the following statements is/are TRUE:?
Consider the following statements about free space managementI) Bit vectors are inefficient unless the entire vector is kept in main memory.II) Linked list approach requi...
Parshu gate
908
views
Parshu gate
asked
Nov 26, 2017
DS
linked-list
data-structures
+
–
1
votes
0
answers
161
linked list
Let P be a single linked list.Let Q be a pointer to an intermediate node 'X' in the list.What is the worst case time complexity of best known algorithm to delete the node 'X ' from the list
Let P be a single linked list.Let Q be a pointer to an intermediate node 'X' in the list.What is the worst case time complexity of best known algorithm to delete the node...
saipriyab
1.4k
views
saipriyab
asked
Nov 25, 2017
Programming in C
linked-list
algorithms
data-structures
+
–
2
votes
1
answer
162
Data structure
what should be the statement at A
what should be the statement at A
nikkey123
389
views
nikkey123
asked
Nov 21, 2017
DS
data-structures
linked-list
+
–
0
votes
2
answers
163
Circular single linked list conceptual
Please explain how to approach this problem?
Please explain how to approach this problem?
Parshu gate
519
views
Parshu gate
asked
Nov 19, 2017
Mathematical Logic
linked-list
+
–
1
votes
1
answer
164
Linked List
Here In this question it is given that we have to perform nlogn decrease key operation and n find operation . 1)Finding an element in the linked list itself takes O(n) and there are N such operations total=O(n2). 2)Decrease key: Find key O(n) + O(1) for decrease=O(n) and there are nlogn such operations: total O(n2logn). Please correct Me : Image :
Here In this question it is given that we have to perform nlogn decrease key operation and n find operation .1)Finding an element in the linked list itself takes O(n) and...
saxena0612
1.3k
views
saxena0612
asked
Nov 16, 2017
DS
data-structures
linked-list
time-complexity
made-easy-test-series
+
–
3
votes
1
answer
165
Circular Linked List
In circular singly linked list, insertion of node requires modification of how many pointers? 1 pointers 2 pointers 3 pointers 4 pointers
In circular singly linked list, insertion of node requires modification of how many pointers?1 pointers2 pointers3 pointers 4 pointers
hacker16
21.5k
views
hacker16
asked
Nov 14, 2017
Programming in C
linked-list
data-structures
+
–
5
votes
1
answer
166
Linked List (Time Complexity)
What would be the asymptotic time complexity to add a node at the end of singly linked list, if the pointer is initially pointing to the head of the list? O(n) O(1) θ(n2) θ(n)
What would be the asymptotic time complexity to add a node at the end of singly linked list, if the pointer is initially pointing to the head of the list?O(n)O(1)θ(n2)θ...
hacker16
3.5k
views
hacker16
asked
Nov 14, 2017
DS
data-structures
linked-list
time-complexity
+
–
1
votes
1
answer
167
linked lists
Consider the following Linked list Node structure struct Node { int data; struct Node * next; } typedef struct Node Node; Consider the following function to reverse the singly linked list Node* reverse_list(Node *head) { Node *temp = NULL; Node *next ; while(head) { next = 1 ... respectively (A) head, head->next (B) head->next,head (C) NULL, head->next (D) head->next, next
Consider the following Linked list Node structurestruct Node { int data; struct Node * next; } typedef struct Node Node;Consider the following function to reverse the sin...
Parshu gate
978
views
Parshu gate
asked
Nov 11, 2017
DS
data-structures
linked-list
+
–
0
votes
1
answer
168
linked list
i am getting 7 but ans given is 6.
i am getting 7 but ans given is 6.
raviyogi
421
views
raviyogi
asked
Nov 7, 2017
Programming in C
linked-list
programming-in-c
+
–
1
votes
0
answers
169
linked list conceptual
Parshu gate
472
views
Parshu gate
asked
Nov 6, 2017
DS
linked-list
data-structures
+
–
5
votes
1
answer
170
Loop detection in a Linked list
Consider the following code which is used to detect the loop in the linked list. Find the missing statement A? p = head; q = head->next; while(A) { if(p == q) exit(0) //loop detected p = p->next; q = (q->next)?(q->next->next) : q-> ... (p!=NULL) || (q!=NULL) Given ans is c.......but I think b could also be correct if not than why..... Please explain
Consider the following code which is used to detect the loop in the linked list. Find the missing statement A?p = head; q = head->next; while(A) { if(p == q) exit(0) //lo...
Shivi rao
1.4k
views
Shivi rao
asked
Nov 2, 2017
Programming in C
linked-list
data-structures
+
–
5
votes
1
answer
171
In-place Merge Sort via Doubly linked list in place of Array
In general merge sort is not considered in-place sorting technique. Because an auxiliary array is used. If we will try to do it in-place in array data structure then our merge procedure will take O($n^2$) time. so overall ... list in place of Array (for storing and merging data) ? Please share your valuable opinion. It will be great help.
In general merge sort is not considered in-place sorting technique. Because an auxiliary array is used. If we will try to do it in-place in array data structure then our ...
Chhotu
1.4k
views
Chhotu
asked
Nov 2, 2017
Algorithms
algorithms
sorting
space-complexity
linked-list
time-complexity
+
–
1
votes
1
answer
172
Linked List
Consider the following program struct node { int value; Node *next; } boolean fun(Node *head) { Node *a,*b; a=head; if(a==NULL) return TRUE; b=a->next; while(b!=NULL && b!=a) { b=b->next; if(b==NULL) return TRUE; b=b->next; a=a->next; } return(b==NULL); } Is the following code return this? a)
Consider the following programstruct node { int value; Node *next; } boolean fun(Node *head) { Node *a,*b; a=head; if(a==NULL) return TRUE; b=a->next; while(b!=NULL && b!...
srestha
691
views
srestha
asked
Oct 28, 2017
DS
linked-list
data-structures
+
–
2
votes
1
answer
173
Linked List
Which of the following operations is performed more efficiently by doubly linked list than by linear linked list? (a). Deleting a node whose location is given. (b). Searching an unsorted list of a given item. (c). inserting a node after the node with a given location. (d). Traversing the list to process each node.
Which of the following operations is performed more efficiently by doubly linked list than by linear linked list?(a). Deleting a node whose location is given.(b). Searchi...
Shubham Kumar Gupta
3.1k
views
Shubham Kumar Gupta
asked
Oct 26, 2017
Programming in C
linked-list
data-structures
programming-in-c
queue
+
–
3
votes
1
answer
174
2. Linked List
Consider the given Doubly Linked List: Consider C like language code snippet with respect to doubly linked list given "p" is pointer to linked list node p=first->next->next->next->prev; p->next->next->prev=p; printf("%d",p->next->next->prev->next->data); What is the output?Plz explain
Consider the given Doubly Linked List:Consider C like language code snippet with respect to doubly linked list given"p" is pointer to linked list nodep=first->next->next-...
srestha
709
views
srestha
asked
Oct 17, 2017
DS
linked-list
data-structures
+
–
1
votes
0
answers
175
Testbook Test Series: Programming & DS - Linked Lists
Consider the following code which is used to detect the loop in the linked list. Find the missing statement A? p = head; q = head->next; while(A) { if(p == q) exit(0) //loop detected p = p->next; q = (q->next)?(q-> ... to the end of the linked list. my answer is q!=NULL and it is in one of the options. Please correct me if I am wrong.
Consider the following code which is used to detect the loop in the linked list. Find the missing statement A?p = head; q = head->next; while(A) { if(p == q) exit(0) //lo...
Jaspreet Singh 4
629
views
Jaspreet Singh 4
asked
Oct 14, 2017
DS
data-structures
linked-list
testbook-test-series
+
–
0
votes
1
answer
176
Linked List
Suppose p and q are 2 nodes in linked list, where p pointing to head node and q pointing to next to head node. Now, chk this condition while(A) { if(p==q)exit(0); p=p->next; q=(q->next)?(q->next->next):q->next; } ... >next->next? And what should be value of A, so that this while loop satisfies the condition that this linked list satisfies the condition for a loop?
Suppose p and q are 2 nodes in linked list, where p pointing to head node and q pointing to next to head node.Now, chk this conditionwhile(A) { if(p==q)exit(0); p=p->next...
srestha
1.2k
views
srestha
asked
Oct 13, 2017
DS
linked-list
data-structures
+
–
0
votes
1
answer
177
ace test
What is best time complexity to search element in sorted doubly linkedlist?? O(n) O(nlogn) O(log n) O(n2)
What is best time complexity to search element in sorted doubly linkedlist??O(n) O(nlogn) O(log n) O(n2)
ADITYA CHAURASIYA 5
386
views
ADITYA CHAURASIYA 5
asked
Sep 28, 2017
DS
time-complexity
ace-test-series
linked-list
+
–
3
votes
1
answer
178
Asymptotic Notation
What is the time complexity to find Kth minimum element from a doubly linked list having 'n' elements? (A) O (n log K ) (B) O (n log n ) (C) O (K log n ) (D) O ( n )
What is the time complexity to find Kth minimum element from a doubly linked list having 'n' elements?(A) O (n log K )(B) O (n log n )(C) O (K log n )(D) O ( n )
Harsh Mehta
1.6k
views
Harsh Mehta
asked
Sep 25, 2017
DS
data-structures
linked-list
time-complexity
+
–
0
votes
2
answers
179
DS-linked_list
With regard to linked list, which of the following statement is false ? (A) An algorithm to search for an element in a singly linked list requires 0(n) operations in the worst case. (B) An algorithm for deleting the first element in a singly linked ... list requires 0(n) operations. (D) An algorithm for deleting the middle node of a circular linked list requires 0(n) operations.
With regard to linked list, which of the following statement is false ?(A) An algorithm to search for an element in a singly linked list requires 0(n)operations in the wo...
rishu_darkshadow
901
views
rishu_darkshadow
asked
Sep 21, 2017
DS
linked-list
+
–
0
votes
1
answer
180
UGC NET CSE | December 2009 | Part 2 | Question: 24
With regard to linked list, which of the following statement is false ? (A) An algorithm to search for an element in a singly linked list requires 0(n) operations in the worst case. (B) An algorithm for deleting the first element ... 0(n) operations. (D) An algorithm for deleting the middle node of a circular linked list requires 0(n) operations.
With regard to linked list, which of the following statement is false ?(A) An algorithm to search for an element in a singly linked list requires 0(n)operations in the wo...
rishu_darkshadow
2.7k
views
rishu_darkshadow
asked
Sep 17, 2017
DS
ugcnetcse-dec2009-paper2
data-structures
linked-list
time-complexity
+
–
Page:
« prev
1
2
3
4
5
6
7
8
9
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register