Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Other

ARRAYS AND ABSTRACT DATA

Rating
-
Sold
-
Pages
2
Uploaded on
04-04-2023
Written in
2022/2023

This Algorithms and Data Structures course will teach you everything you need to prepare for placements, interviews and logic building. This playlist will teach you how to create optimal solutions to your real world problems. We will cover a wide variety of data structures and algorithms in this course. Make sure to access the notes I have provided along with the course.

Show more Read less
Institution
Course

Content preview

Arrays and Abstract Data Type in Data Structure (With Notes)
CodeWithHarry
So I have a friend that wanted to build a PC So he approached me and
asked '' Harry , can you give me a blueprint to build PC ? '' '' So that
with that blueprint I can make someone build PC? '' '' I want to do
gaming and streaming. '' So I gave him this blueprint. I told him all the
main components of a PC. And even if he makes a mistake , It wo n't be a
big deal. We will study array ADT. Array as an Abstract Data Type. Arrays
as an abstract data type. In that , I will give you MRF. Not MRF tyres,
nor the bat one ; I 'll give you minimal. . . minimal Required
functionalities. And some operations , that you can define later on your
own. Let us understand this with the example of an array. Arrays can be
found in a lot of programming languages. Arrays are found in C, C++, Java
and Java. In Python, they are called 'lists' and in Java, they're called
lists. There are some minimal required functionalities in arrays. For
example, Get is done , Set is done. Along with that there can be a resize
functionality.


An array is a collection of elements. Accessible by an index. The memory
layout of the C programme is a code section. Inside the stack, there are
local variations of a function. Inside a function is a stack. Inside an
array is the heap. The kernel is the kernel of the kernels. In most
programming languages, the index of an array starts at 0 It has a reason
; when we start from 0 , We get a certain advantage but I wo n't go
there. But, you can search on the internet There 's a paper by jee-stars.
In that they 've explained what will happen if it starts from 1 or 0. How
calculations will become easy. If you say that you do n't want 38 , you
want a greater one Then you wo n't get it. When you requested a memory
till 38, then it is possible that some other application was given some
memory by the compiler. It will be doing its job with this memory.
Otherwise in the same programme It must have allocated a variable in
correspondence with that memory. So you 're saying that you want to
increase it So you can not make it larger in this array. You can increase
it in the linked list, we 'll talk about that ahead. If you skip the
practice set it 'll be over in 6 hours.


An array can not be resized. Directly I can not resize it , I ca n't
increase it. It wo n't get this block ; no. It can be. resized this way.
Why should we use an array ? Why did we make an array? We made the array
because Because at one point I have these 10 addresses. Get and Set is
very easy in the C language. The programming language gives them to you
by default. But we 'll implement this array ADT with the help of
structure structure. This is our abstract data type. We 'll build it
however we want to. And we'll add many more operations. In my ADT I will
provide the user with the ability to use my Add method. So that he/she
will be able to add lots of arrays directly. That why we use arrays.
Faster retrieval , faster updation. Where does the scam happen in the
array ? At the time of deletion and insertion. If I want to insert an
element , it becomes costly. Because I 'll have to move it. There are
some disadvantages too , but it varies from use case to use case. And you
'll get that by practising. And I will ensure that you get it.


In an abstract data type, abstraction means hiding the implementation
details. And you are being given an assurance ; a provision To carry out
these operations. Array ADT holds a collection of elements It can float ,
it can be int. It can be classes in C++. And it can also be structure in
C language. The array can be accessed and updated in O (1 ) time. Because

Written for

Course

Document information

Uploaded on
April 4, 2023
Number of pages
2
Written in
2022/2023
Type
OTHER
Person
Unknown

Subjects

$8.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
muhammadharoon3

Also available in package deal

Get to know the seller

Seller avatar
muhammadharoon3 Exam Questions
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 year
Number of followers
0
Documents
7
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

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions