Tutorial 2 : Characteristic & Basic Terminologies of Data Structure
Interface and Implementation
- Data Structure is a systematic way to organize data in order to use it efficiently. Following terms of data structure we should know.
Interface – Interface represents the set of operations that a data structure supports. An interface only provides the list of supported operations, type of parameters they can accept and return type of these operations.
Implementation – Implementation provides the internal representation of a data structure. Implementation also provides the definition of the algorithms used in the operations of the data structure.
Characteristics of a Data Structure
- Correctness – Data Structure implementation should implement its interface correctly.
- Time Complexity – Running time or a Execution time of operations of data structure must be as small as possible.
- Space Complexity – Memory usage of a data structure operation should be as little as possible
Need for Data Structure
- Searching data
- Need to manage processor speed
- serve multiple request simultaneously
Execution Time Cases
- There are three cases which are usually used to compare various data structure’s execution time:
- Worst Case – when a particular data structure operation takes maximum time.
- Average Case – This is the scenario depicting the average execution time of an operation of a data structure.
- Best Case – This is the scenario depicting the least possible execution time of an operation of a data structure.
