Saturday, August 11, 2018

Data Structure & Algorithms in basic Introduction.....

DATA STRUCTURE & ALGORITHMS INTRODUCTION DATA STRUCTURE & ALGORITHMS


Define Data Structures

The process of organizing the data to use in an efficient way is Data Structure. The main foundation terms of data structures are:
  • Interface − Each data structure has an interface. The set of operations supported by the data structure is Interface. The list of supported operations, type of parameters accepted and the return type of the operations are provided by an Interface.
  • Implementation – The internal representation of the data structure is provided by Implementation. The algorithms used in the operations of the data structures are also defined by the Implementation.

What are the characteristics of a Data Structure?

The following are some of the characteristics of Data Structure
  • Correctness – The interface must be implemented correctly by the Data structure implementation.
  • Time Complexity – Data structure running time or operations execution time need to be small.
  • Space Complexity − Memory usage of a data structure operation should be as little as possible.

Why Data Structure is needed?

Applications face few problems as they becoming more complex with rich data. Some of them are:
  • Data Search − Consider an inventory of 1 million(106) items of a store. If the application is to search an item, it has to search an item in 1 million(106) items every time slowing down the search. The search becomes slower as the data grows.
  • Processor speed − Processor speed although being very high, falls limited if the data grows to billion records.
  • Multiple requests – Even the fast server fails sometimes in searching the data as thousands of users can search data simultaneously on a web server.
Data structure rescue by solving these problems. Data structure facilitates in organizing the data in such a way that it ensures that all the items need not be required to be searched and the data required can be searched instantly.

How to compare Data structure execution time?

The cases used to compare the execution time of the data structure are as follows:
  • Worst Case – In this scenario, the data structure operations takes the maximum time. If an operation's worst case time is ƒ(n) then this operation will not take more than ƒ(n) time where ƒ(n) represents function of n.
  • Average Case − This is the scenario which represent the average execution time of an operation of a data structure. If an operation takes ƒ(n) time in execution, then m operations will take mƒ(n) time.
  • Best Case − This is the scenario representing the least possible execution time of an operation of a data structure. If an operation takes ƒ(n) time in execution, then the actual operation may take time as the random number which would be maximum as ƒ(n).

What is the basic terminology used in Data Structures?

  • Data − Data are values or set of values.
  • Data Item − Data item refers to single unit of values.
  • Group Items − Data items that are divided into sub items are called as Group Items.
  • Elementary Items − Data items that cannot be divided are called as Elementary Items.
  • Attribute and Entity − An entity is that which contains certain attributes or properties, which may be assigned values.
  • Entity Set − Entities of similar attributes form an entity set.
  • Field − Field is a single elementary unit of information representing an attribute of an entity.
  • Record − Record is a collection of field values of a given entity.
  • File − File is a collection of records of the entities in a given entity set.

No comments:

Post a Comment