logo

Data Structures and Operations

   

Added on  2023-03-21

19 Pages1986 Words100 Views
Running head: BTEC HND IN COMPUTER SYSTEMS DEVELOPMENT
BTEC HND in Computer Systems Development
Name of the Student
Name of the University
Authors note
Data Structures and Operations_1
1BTEC HND IN COMPUTER SYSTEMS DEVELOPMENT
Data structures and valid operations on them
Data structure: Array
An array data structures is considered as the collection of similar stored data elements
stored in at contiguous locations in the memory. The main concept behind this data structure
is the to store multiple same types of data type together. In this way it becomes easier to
calculate the required memory as well as the position of every element in the memory as they
take the same amount of space while by simply adding offset value to the base value or the
starting position (i.e., memory location of the first element) stored in the array.
Available operations on Array
Traversal of the elements − This operation prints all array elements one by one as
stored in array.
Insertion of the elements – Adding element to the array at given index.
Deletion – Deletion of the element from a given index.
Search – Searching for a specific element using the index or value.
Update – This operation is helpful in updating an element at an index.
Data structure: Array list
The Array list can be defined as the resizable arrays that makes the use of the list
interface. The size of array list can be shrunk or grow according to the requirement of the
application that is using it. The elements in the array list can be accessed randomly.
Available operations
Insertion of the element
Traversal and printing
Data Structures and Operations_2
2BTEC HND IN COMPUTER SYSTEMS DEVELOPMENT
Searching specific element
Removal of elements
Sorting elements of the array list.
Data structure: Linked list
The Linked list is represented as a linear data structure. In this data structure, the
elements in the data structure is not stored at contiguous locations of the memory. The
elements stored inside any linked list are connected using pointers in each node along with
the data part with the node.
Insertion of elements − This operation is helpful in adding an element at the
beginning of linked list.
Deletion − Deletes an element from the beginning.
Display – prints all the elements in the linked list.
Searching of an element− Searches for an element with a given key.
Deletion − Deletes an element.
Data structure: Stack
Stack is another abstract data structure that had predefined capacity for certain
number of elements. This kind of data structure can be considered as a simple data structure
which only allows addition/removal of elements in some specific order. Whenever an
element is added to the stack then the it always is stored on the top of stack data structure. In
the similar manner whenever an element is removed from the stack, then the last inserted
element on the top is first removed.
Data Structures and Operations_3
3BTEC HND IN COMPUTER SYSTEMS DEVELOPMENT
Valid operations on the stack data structure
There are usually three operations are available for stack data structure which is
traversal, push and pop. Through the push an element is stored in the stack, using pop an
element is deleted from the stack and traversal is helpful in the displaying all the elements
stored in the stack.
Data structure: Queue
Similar to the stack, the queue is another liner data structure that acts as first in first
out manner. In this data structure first element is inserted at the one end or the REAR end.
On the contrary to the stack the removal of an element is takes place from another end which
is denoted as FRONT or the head. In this way the queue becomes an FIFO (First in First
Out) data structure. Therefore, an element inserted first is removed first.
Following are the valid operations on the queue data structure; Traversal of the
elements to access all the elements, Enque or the addition of the elements, Deque or deletion
of an element - This is the process of accessing each and every element of the queue.
Searching for an element and finally merging two queues.
Data structure: Tree
The tree abstract is a recursive collection of data nodes that starts from a root
node. Each of the node consist of a value as well as list of references to the last and next
nodes or to the children nodes. In the tree data structure, the no duplicate constraint is applied
and none of the child nodes points to the root.
Data Structures and Operations_4

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
How to Create a Test File in C++ PDF
|8
|1260
|40

Data Structure - Assignment
|9
|1398
|163

Bag ADT: Introduction, Operations, and Implementations
|4
|688
|183

Network Optimisation using Graph Theory | Desklib
|16
|1379
|79

PI306 C++ Programming Name of the Student Name of the University Authors
|14
|2251
|265

Programming, Algorithms and Data Structure: Weekly Tasks and Exercises
|2
|501
|348