Make a middle node of doubly link list to the top of the list.
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: Queue: array in which you insert at front and remove from rare.Static Queue: queue which is of fix size and can not variate in size at runtime.Optimized way to count the elements present.F -> frontR -> rareNo -> no of elements presentMax_size -> max size ...
What is Priority Queue? Explain with example.
Latest Answer: A priority queue is essentially a list of items in which each item has associated with it a priority. In general, different items may have different priorities and we speak of one item having a higher priority than another. Given such a list we can determine ...
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;}} ...
Latest Answer: Is it not vice-versa. Non linear should be for fast memory access and linear for
data storage. Because traversing thru non linear data structure is always less
time consuming. ...
If you have one million named objects and you want to store them in a data structure that lets you insert new objects quickly and search for an object by name quickly, what data structure should you use?
Latest Answer: Since there is the question about serching and insertion quickly, i think the data structure should be binary serach tree , not simple binary tree ...
How will you identify Stack Overflow?
Latest Answer: Stack overflow condition is raised when Top=max-1 where max is the size of the array n, Top is the topmost element. ...
Explain what are linear data structure & non-linear data structure?
Latest Answer: A data structure is classified into two categories: Linear and Non-Linear data structures. A data structure is said to be linear if the elements form a sequence, for example Array, Linked list, queue etc. Elements in a nonlinear data structure do not ...
View page [1] 2 3 4 5 6 7 8 9 10 Next >>

Go Top