100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Other

Introduction to Common Data Structures and their Applications in Computer Science

Rating
-
Sold
-
Pages
11
Uploaded on
25-02-2023
Written in
2022/2023

Arrays, strings, linked lists, stacks, queues, binary trees, heaps, and hashing are just a few of the data structures that are covered in the notes that are some of the most often used in computer science. Each data structure has distinctive qualities and uses in various computer science issues. The merits and limitations of each data structure are highlighted in a brief description of their characteristics and uses in the notes.

Show more Read less
Institution
Course









Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Course

Document information

Uploaded on
February 25, 2023
Number of pages
11
Written in
2022/2023
Type
Other
Person
Unknown

Subjects

Content preview

What is Data Structure?

A data structure is a storage that to store and organises data. It is a way of arranging data on a
computer so that it can be accessed and updated efficiently.
A data structure is used for more than just data organisation. Moreover, it is employed for data
processing, retrieval, and archiving. Almost all software systems and programmes that have
been built use many basic and advanced forms of data structures.

Data structures are essential components of computers that are used to organise data in
memory. They are necessary and in charge of effectively organising, processing, accessing, and
storing data. Yet, this is not all. Several types of data structures each have unique traits,
capabilities, uses, benefits, and drawbacks.

Types of Data Structures:

● Array Data Structure.
● String Data Structure.
● Linked List Data Structure.
● Stack Data Structure.
● Queue Data Structure.
● Binary Tree Data Structure.
● Heap Data Structure.
● Hashing Data Structure.




1. Array Data Structure.

Arrays are a collection of elements of the same data type that are stored in contiguous memory
locations. The elements of an array can be accessed using an index, which is an integer value
that represents the position of the element in the array. Arrays can be one-dimensional,
two-dimensional, or multi-dimensional, depending on the number of indices required to access
the elements. In most programming languages, arrays are zero-indexed, which means that the
first element of an array has an index of 0. The size of an array, which is the number of
elements it can hold, must be specified when the array is declared.
Arrays are useful for storing and manipulating large amounts of data efficiently, and they are a
fundamental data structure in many algorithms and data structures.
Some common operations on arrays include accessing elements by index, iterating over all the
elements of the array, sorting the elements, and searching for a specific element.
Arrays can also be used to implement other data structures, such as stacks, queues, and hash
tables.
One potential downside of arrays is that their size is fixed once they are declared, which can
make them less flexible than other data structures for some use cases.

, Arrays are often used in computer programming to store and manipulate data in a way that is
both efficient and convenient. Since all the elements of an array are stored in contiguous
memory locations, accessing an element by index takes constant time, or O(1) time in big O
notation. This makes arrays well-suited for tasks such as searching, sorting, and iterating over
large amounts of data.

Arrays can be one-dimensional, two-dimensional, or multi-dimensional, depending on the
number of indices required to access the elements. For example, a one-dimensional array is like
a list of values, where each value can be accessed using a single index. A two-dimensional
array, also known as a matrix, can be thought of as a table of values, where each value is
identified by a row index and a column index.

In most programming languages, arrays are zero-indexed, which means that the first element of
an array has an index of 0. For example, in a one-dimensional array with 10 elements, the first
element is accessed using index 0, and the last element is accessed using index 9.

The size of an array must be specified when the array is declared, and it cannot be changed
once it is created. This means that arrays are static data structures, which can be a limitation in
some situations. For example, if you need to store a variable amount of data, such as the
results of a user input form, an array may not be the best choice.

Arrays can be used to implement other data structures, such as stacks, queues, and hash
tables. For example, a stack can be implemented using a one-dimensional array, where
elements are added and removed from the end of the array. Similarly, a queue can be
implemented using a one-dimensional array, where elements are added to the end of the array
and removed from the beginning.

When working with arrays, it is important to be aware of common operations such as accessing
elements by index, iterating over all the elements of the array, sorting the elements, and
searching for a specific element. Many programming languages provide built-in functions or
methods for performing these operations efficiently.

Arrays have some disadvantages as well. Since the size of an array is fixed, it can be wasteful
of memory if the array is declared to be larger than it needs to be. Additionally, inserting or
deleting elements in the middle of an array can be slow, since all the subsequent elements must
be shifted over to make room for the new element or fill in the gap left by the deleted element.
For these reasons, other data structures such as linked lists or dynamic arrays may be more
suitable for certain tasks.

2. String Data Structure.

A string is a sequence of characters that represents a piece of text or data. In many
programming languages, strings are a built-in data type that can be manipulated using various
operations.
$9.88
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
mikethetyson

Get to know the seller

Seller avatar
mikethetyson Engineering College
Follow You need to be logged in order to follow users or courses
Sold
0
Member since
2 year
Number of followers
0
Documents
1
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions