1. Personal - Data Structure is a way of storing data in a computer. Their are many types of data structure like stacks, trees, lists, array, queues,graph and ect. It is an organization of mathematical and logical concepts of data. Data structure is a pit of information.
2. A data structure is a group of data elements grouped together under one name. These data elements, known as members, can have different types and different lengths.
3. Data structure is an organization of information, usually in memory, for better algorithm efficiency, such as queue, stack, linked list, heap, dictionary, and tree, or conceptual unity, such as the name and address of a person. It may include redundant information, such as length of the list or number of nodes in a subtree.
4. Data structure represent implementations or interfaces. A data structure can be viewed as an interface between two functions or as an implementations of methods to access storage that is organized according to the associated data type.
5. Data structure in programming refers to a scheme for organizing related pieces of information.
6. A data structure in computer science is a way of storing data in a computer so that it can be used efficiently. It is an organization of mathematical and logical concepts of data.
7. Data structure refers to a collection of facts usually collected as the result of experiences, observation of experiment, or processes within a computer system, or a set of premises.
8.Data structure may consist of numbers, words or images, particularly as measurements or observations of a set of variables.
9. Data structure is often viewed as a lowest level of abstraction from which information and knowledge are derived.
10. Data structure always refers to user and configuration. It is also a collection of processed information.
B.
1.Hash table
In computer science, a hash table, or a hash map, is a data structure that associates keys with values.The primary operation that hash functions support efficiently is a lookup: given a key (e.g., a person's name), find the corresponding value (e.g., that person's telephone number). It works by transforming the key using a hash function into a hash, a number that is used as an index in an array to locate the desired location ("bucket") where the values should be.In most cases the hash function is deliberately chosen to have pseudo-random properties, so that small changes of a key give a large and apparently random (although of course reproducible) effect on the hash returned. Because of this random effect, in some cases, the calculated index can be the same for two different keys (a "collision"); different hash table designs handle this issue in different ways.
Hash tables support the efficient lookup, insertion and deletion of elements in constant time on average (O(1)) that does not vary with the number of elements stored in the table; although may vary somewhat depending on how full the table is.
A hash table works by transforming the key using a hash function into a hash, a number that is used as an index in an array to locate the desired location ("bucket") where the values should be. The number is normally converted into the index by taking a modulo operation, or sometimes bit masking is used where the array size is a power of two. The optimal hash function for any given use of a hash table can vary widely, however, depending on the nature of the key.
Typical operations on a hash table include insertion, deletion and lookup (although some hash tables are precalculated so that no insertions or deletions, only lookups are done on a live system). These operations are all performed in amortized constant time, which makes maintaining and accessing a huge hash table very efficient.
An important property of a hash table is how "full" the table is, that is the ratio between the number of entries n and the size s of the hash table (i.e. the size of the array it uses to store values). The quotient n/s is therefore called the load factor of the hash table.Most hash table implementations only perform well if the load factor is kept in a certain range.
Hash tables store data in pseudo-random locations, so accessing the data in a sorted manner is a very time consuming operation. Other data structures such as self-balancing binary search trees generally operate more slowly (since their lookup time is O(log n)) and are rather more complex to implement than hash tables but maintain a sorted data structure at all times. See a comparison of hash tables and self-balancing binary search trees.
2. Files
A collection of data or information that has a name, called the filename. Almost all information stored in a computer must be in a file. There are many different types of files: data files, text files , program files, directory files, and so on. Different types of files store different types of information. For example, program files store programs, whereas text files store text.
A file information data structure (INFDS) can be defined for each file to make file exception/error and file feedback information available to the program. The file information data structure, which must be unique for each file, must be defined in the main source section. The same INFDS is used by all procedures using the files.
The INFDS contains the following feedback information:
- File Feedback (length is 80)
- Open Feedback (length is 160)
- Input/Output Feedback (length is 126)
- Device Specific Feedback (length is variable)
- Get Attributes Feedback (length is variable)
- Note:
- The get attributes feedback uses the same positions in the INFDS as the input/output feedback and device specific feedback. This means that if you have a get attributes feedback, you cannot have input/output feedback or device feedback, and vice versa.
The file feedback information starts in position 1 and ends in position 80 in the file information data structure. The file feedback information contains data about the file which is specific to RPG. This includes information about the error/exception that identifies:
- The name of the file for which the exception/error occurred
- The record being processed when the exception/error occurred or the record that caused the exception/error
- The last operation being processed when the exception/error occurred
- The status code
- The RPG IV routine in which the exception/error occurred.
The location of some of the more commonly used subfields in the file feedback section of the INFDS is defined by special keywords.
A circular buffer or ring buffer is a data structure that uses a single, fixed-size buffer as if it were connected end-to-end. This structure lends itself easily to buffering data streams.
A circular buffer first starts empty and of some predefined length.If two elements are then removed from the buffer then they come from the end. The two elements removed.A consequence of the circular buffer is that when it is full then a subsequent write is performed then it starts overwriting the oldest data.Alternatively, the routines that manage the buffer could easily not allow data to be overwritten and return an error or raise an exception. Whether or not data is overwritten is up to the semantics of the buffer routines or the application using the circular buffer.
