标签:imp interview cti which index any into done cat
Data structure is a way that specifies how to organize and manipulate the data. It also specifies the relationship between them. It provides some algorithms to make data access more efficient and easy.
Data structures are applied extensively in the following areas of computer science:
Difference between file structure and storage structure:
The main difference between file structure and storage structure is based on memory area that is being accessed.
Storage structure: When we deal with the structure that resides in the main memory of the computer system, known as the storage structure.
File structure: When we deal with an auxiliary structure then it is referred as file structures.
A Binary Tree is a type of data structure that has two nodes: A left node and a right node. In programming, binary trees are actually an extension of the linked list structures.
A stack is a data structure in which only the top element can be accessed. As data is stored in the stack, each data is pushed downward, leaving the most recently added data on top.
A multidimensional array stores data in multiple indexes. It is used when the storing data that cannot be represented using a single dimensional indexing, such as data representation in a board game, tables with data stored in more than one column.
A linked list is a sequence of nodes in which each node is connected to the node following it. It makes a chain like link of data storage.
The heterogeneous linked list contains different data types, so it is not possible to use ordinary pointers for this. For this work, you have to use a generic pointer type like void pointer because void pointer is capable of storing pointer to any type.
Two queues are needed. One queue is used for actual storing of data and another for storing priorities.
Stack is used to perform recursion because of its LIFO (Last In First Out) property. It knows whom to return when the function has to return.
A binary search algorithm is used to search a list when the elements are already in order or sorted. The list starts searching in the middle, if the middle value is not the target search key, it will check to see if it will continue the search on the lower half of the list or the higher half. The split and search will then continue in the same manner.
Example:
It can be done by using an indexed loop such that the counter runs from 0 to the array size minus one. By this manner, you can reference all the elements in sequence by using the loop counter as the array subscript.
Polish and Reverse Polish notations.
Application of Tree- data structure:
A linked list is considered both linear and non-linear data structure depending on the situation.
PUSH and POP operations specify how data is stored and retrieved in a stack.
PUSH: PUSH specifies that data is being "pushed" into the stack.
POP: POP specifies data retrieval, and in particular refers to the topmost data being accessed.
An expression which each operator follows its operand is known as postfix expression. The main benefit of this form is that there is no need to group sub-expressions in parentheses or to consider operator precedence.
Data Structure Interview Questions Data Structure Interview Questions
标签:imp interview cti which index any into done cat
原文地址:https://www.cnblogs.com/vicky-project/p/9351123.html