Write a program of Linked List using pointers.
What is forest data structure? How is it useful?
Which data structure is used for inserting and deleting dynamically?
Latest Answer: Linked lists are best suited for Dynamic insertion and deletion.. as an element can be added at any point in the list with O(1). ...
How a value can be accessed through an address?How pointers can be used a funtions?
Latest Answer: A value can be accesed through its address by use of pointers..Assigning any element as int x=10;int *p=&x;assigns the address of 'x' to pointer 'p'A pointer can be used as a function by using it as int (*p) (int, int){/// Function ...
Make a middle node of doubly link list to the top of the list.
Latest Answer: node *n1,*n2;n1 = n2 = head;while((n2->next) && (n2->next->next)){ n1 = n1->next; n2 = n2->next->next;]// n1 points to the middle nown1->prev->next = n1->next;n1->next->prev ...
How is memory reserved using a declaration statement?
Latest Answer: When you delare any variable it is assigned in the data segment.Data Segment (data+bss+heap)stackand this is so memory is reserved. ...
Write an algorithm to calculate the number of items in a static queue?
Latest Answer: [F=front, R=rear, P= pointer, q[] is the array variable] Algorithm: if F != R P= F count = 0 while(P
What is Priority Queue? Explain with example.
Latest Answer: Heap is also called a priority queue. Heaps are of two types one is min heap and other is max heap. Min heap contains min at the top of tree. ...
What is Circular Queue? Explain with examples.
Latest Answer: In a normal Queue when queue becomes full we can not add more items, so
following items are lost. But in a circular queue when queue becomes full
it will start overwriting the items from beginning so that new items/data won't
waste. It is ...
How do you convert doubly linked list to single without using structures?
Latest Answer: Saynode{infonode lptr,rptr}main{node p;p=start;q=p->rptr;while(p!=Null){q->lptr=Null;p=q;q=p->rptr;}} ...
View page [1] 2 3 4 5 6 7 8 9 10 Next >>

Go Top