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 ...
Latest Answer: Function templates involve telling a function that it will be receiving a specified data type and then it will work with that at compile time.The difference with this and function overloading is that function overloading can define multiple behaviors ...
Explain What is a node data structure Write a function such that the node data structure to visit all of the nodes in a binary tree?
Latest Answer: struct node{int datastruct node *next;}*root;int count=0;void count(struct node *nd){if(nd!=NULL){count(nd->left);count++;count(nd->right);}}call count(root) which give the count in count variable. ...
Latest Answer: void is generic pointer.Example void * vp;int *ip;char * cp;vp = ip;//okvp = cp;But viceversa not allowed.ie ip = vp; not allowed ...
Is it possible to implement trees using arrays ? If yes, how?
Latest Answer: Yes it's possible to implement trees using arrays, root node is place in 0th position.A node in ith position will have its left child at 2*ith position and right child at 2*i + 1th position.That's itIt was clearly given in Samanta book. ...
Latest Answer: There are many advantages with database approach compared to a flat file system. Some of them are:
1) It's not possible to implement relationships between files in filesystem.2) Controlled redundancy3) Program-data independence4) Easy to maintain large ...
Explain how recursive algorithm is converted into recurrence relation with example.
Latest Answer: Say we want to represent the following recursionint recurse(int a){ return a+recurse(a-1);}x={x|x=a(a+1)/2} for all a ...
Explain how performance of algorithm is analysed?
Latest Answer: The performance of an algorithm is analysed by the time complexity as well as its space complexity though both the complexities are trafe-offs between them. If time complexity increases then space complexity decreases & vice-versa. Also the best & ...
What is Polymorphic Data Type? Give example
Latest Answer: Polymorphic data type is implemented using generic pointers that stores a byte address and not the type of data stored in that memory address. so a polymorphic data type can take on any type of value as required.ex: function( void *a, void *b)
here ...
What does it mean when a data structure is declared volatile?
What does it mean when a data structure is declared Const?
Latest Answer: Volatile - you are asking compiler to not to optimise the data structure as well as to reload to CPU registers whenever it is in use. Not a good idea for Data structure, will waste lot of CPU time in loading long data structures. ...
View page << Previous 1 [2] 3 4 5 6 7 8 9 10 Next >>

Go Top