_____________________________________________ A ______________________________________________ 1. Answer: A data structure is a way of organizing data that considers not only the items stored, but also their relationship to each other. Advance knowledge about the relationship between data items allows designing of efficient algorithms for the manipulation of data.
(1)Array (2) Stacks (3) Queues (4) Linked lists (5) Trees (6) Graphs
Answer: The major data structures used are as follows: - RDBMS - Array (i.e. Array of structures)
- Network data model - Graph
- Hierarchical data model - Trees
4. If you are using C language to implement the heterogeneous linked list, what pointer type will you use?
Answer: The heterogeneous linked list contains different data types in its nodes and we need a link, pointer to connect them. It is not possible to use ordinary pointers for this. So we go for void pointer. Void pointer is capable of storing pointer to any type as it is a generic pointer type.
You can find out by using 2 pointers. One of them goes 2 nodes each time. The second one goes at 1 nodes each time. If there is a cycle, the one that goes 2 nodes each time will eventually meet the one that goes slower. If that is the case, then you will know the linked-list is a cycle.
void reverselist(void) for(; curnext!=0; )
Create two pointers, each set to the start of the list. Update each as follows:
Answer: Two. One queue is used for actual storing of data and another for storing priorities.
Answer: Stack. Because of its LIFO (Last In First Out) property it remembers its 'caller' so knows whom to return when the function has to return. Recursion makes use of system stack for storing the return addresses of the function calls. Every recursive function has its equivalent iterative (non-recursive) function. Even when such equivalent iterative procedures are written, explicit stack is to be used.
Answer: Polish and Reverse Polish notations.
Answer: Prefix Notation: ^ - * +ABC - DE + FG Postfix Notation: AB + C * DE - - FG + ^
Answer: The methods available in storing sequential files are: - Straight merging,
- Natural merging,
- Polyphase sort,
- Distribution of Initial runs.
Answer: 1014 For example, consider a tree with 3 nodes(n=3), it will have the maximum combination of 5 different (ie, 23 - 3 = 5) trees In general:
Answer: The list is as follows: - The manipulation of Arithmetic expression,
- Symbol Table construction,
- Syntax analysis.
Answer: The applications are listed below: - Sparse matrix,
- Index generation.
Answer: The list is as follows: - The manipulation of Arithmetic expression,
- Symbol Table construction,
- Syntax analysis.
Answer: The applications are listed below: - Sparse matrix,
Answer: A spanning tree is a tree associated with a network. All the nodes of the graph appear on the tree once. A minimum spanning tree is a spanning tree organized so that the total edge weight between nodes is minimized. Index generation.
Answer: According to Access strategies Linked list is a linear one.
The answer is the void pointer. The heterogeneous linked list contains different data types in it's nodes and we need a link, pointer, to connect them. Since we can't use ordinary pointers for this, we use the void pointer. Void pointer is a generic pointer type, and capable of storing pointer to any type.
Two. One queue is used for the actual storing of data, and the other one is used for storing the priorities. ·Manipulation of the arithmetic expressions. ·Symbol table construction. ·Syntax analysis.
ANS :- Backtracking
If the "pivotal value", or the "heig |