Please enable JavaScript.
Coggle requires JavaScript to display documents.
kump 4, {Group 4} Charter 2 [LINK], types of data structure, STATIC,…
kump 4
ARRAY
Array is a container which can hold a fix number of items and these items should be of the same type. Most of the data structures make use of arrays to implement their algorithms. Following are the important terms to understand the concept of Array.
-
Index − Each location of an element in an array has a numerical index, which is used to identify the element.
ARRAY REPRESENTATION
Arrays can be declared in various ways in different languages. For illustration, let's take C array declaration.
As per the below illustration, following are the important points to be considered.
-
-
Each element can be accessed via its index. For example, we can fetch an element at index 6 as 9.
-
DISADVANTAGES OF ARRAYS
-
Array is static structure. It means that array is of fixed size. The memory which is allocated to array can not be increased or reduced.
Since array is of fixed size, if we allocate more memory than requirement then the memory space will be wasted. And if we allocate less memory than requirement, then it will create problem.
The elements of array are stored in consecutive memory locations. So insertions and deletions are very difficult and time consuming.
ABSTRACT DATA TYPE
An abstract data type or ADT is a mathematical model of a data structure. No implementation in detail.
-
Example: lists, sets, graphs, stacks are examples of ADT along with their operations.
-
DECLARING STRUCTURE
-
The elements of structure, known as members can be of different data types.
Each structure you define can have an associated structure name which is referred to as structure tag.
To declare a structure, use the struct statement. It declares a new data type, with more than one member.
DATA STRUCTURES course is designed to focus on the basic data structures. Among the specific data structures covered are linked list, stacks, queues, trees, sorting and searching. The emphasis is on choosing appropriate data structures and designing correct and efficient algorithms to operate on these data structures.
-
In computer science, data structures are an important way of organizing information in a computer.
- Primitive 2. Non Primitve 3. Static and Dynamic
-
NON PRIMITIVE
Arrays : a collection of elements (values or variables), each identified by at least one array index or key
-
-
Linked List : a linear collection of data elements, called nodes, each pointing to the next node by means of a pointer
-
Queues : an abstract data structure, somewhat similar to Stacks
-
Is a data structure that changes in size as a program needs it by allocating and de-allocating memory
-
-
-
-
-