One Dimensional Array

Simplest data structure that makes use of computed address to locate its elements is the one-dimensional array or vector;number of memory locations is sequentially allocated to the vector. A vector size is fixed and therefore requires a fixed number of memory locations. Vector A with subscript lower bound of “one” is represented as below L0is … Read more

Case Analysis in Data Structure

Worst Case Analysis In the worst case analysis, we calculate upper bound on running time of an algorithm. We must know the case that causes maximum number of operations to be executed. For Linear Search, the worst case happens when the element to be searched is not present in the array. When x is not … Read more

Time and space analysis of algorithms

Algorithm An essential aspect to data structures is algorithms. Data structures are implemented using algorithms. An algorithm is a procedure that you can write as a C function or program, or any other language. An algorithm states explicitly how the data will be manipulated. Algorithm Efficiency Some algorithms are more efficient than others. We would … Read more

Operation on Data Structures

Design of efficient data structure must take operations to be performed on the data structures into account. The most commonly used operations on data structure are broadly categorized into following types, Create The create operation results in reserving memory for program elements. This can be done by declaration statement. Creation of data structure may take … Read more

Classification of Data Structure

Data Structures are normally classified into two broad categories. 1.Primitive Data Structure 2.Non-primitive data Structure Data types A particular kind of data item, as defined by the values it can take, the programming language used, or the operations that can be performed on it. Primitive Data Structure Primitive data structures are basic structures and are … Read more

What is Data Structure?

Data structure is a representation of the logical relationship existing between individual elements of data. Data Structure is a way of organizing all data items that considers not only the elements stored but also their relationship to each other. We can also define data structure as a mathematical or logical model of a particular organization … Read more

Introduction to Data Structure

Computer is an electronic machine which is used for data processing and manipulation. When programmer collects such type of data for processing, he would require to store all of them in computer’s main memory. In order to make computer work we need to know Representation of data in computer. Accessing of data. How to solve … Read more

Characteristics of an Algorithm

An algorithm should have the following characteristics − Unambiguous − Algorithm should be clear and unambiguous. Each of its steps (or phases), and their inputs/outputs should be clear and must lead to only one meaning. Input − An algorithm should have 0 or more well-defined inputs. Output − An algorithm should have 1 or more … Read more