Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Overig

ARRAYS AND ABSTRACT DATA

Beoordeling
-
Verkocht
-
Pagina's
12
Geüpload op
04-04-2023
Geschreven 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.

Meer zien Lees minder
Instelling
Vak

Voorbeeld van de inhoud

Array as An Abstract Data Type in Data Structures(With Notes)
CodeWithHarry
Abstract Data Type is a new data type upon which we have defined our set
of operations and values. We can directly link it with object-ended
programming. So what have I done ? I 've made a OneNote Notebook. And
here, by the name of 'Algorithms. 1' An integer is not an abstract data
type, it is a primitive data type. Like an integer, I can also make my
own data type , Assume that I want to make a data type called 'my array'
The C language is a special type of array. It must have a total size.
total_size. And after that, it must have an address , Base address. Base
address is the pointer. This My Array ADT that's being made The
representation of the set of values This is it. I 'll do it like this.
And I'll write here + , meaning the set. of operations. Here I can define
some operations. What can those operations be ? Those operations can be
anything. It 's my choice ; whatever I choose to keep. So we can define a
lot of these types of operations And we can make our custom data types.
So I have made a My Array abstract data type.


This is Stack And this is Heap. Stack is the static memory; Heap is the
dynamic memory. If I want to make an array, I can either I make the array
in the stack Like if this is the stack of the main function , okay. This
is the heap of my main function. I 'll write Main here. Or I make an
integer pointer here. I request some memory , And make its previous
address point , And here with my array , I can request Its indices will
be 0,1,2,3,4. . . Okay ? In this manner, I can add some values to it
7,8,12,27,88. . . It 's my choice ; whatever I choose to put. So in this
way I can make this array. If we have to make an array of size 'n ' , So
n multiplied by ; meaning star Then the size of operator , and after
that, int. In which we will define the total size , the use size , use
size, the base address and after that , We will define some of our
operations on it. Figure out once you see it When I give you the
notebook. And here I 'll write ; this is the 'representation ' And after
that, we 'll have 'operations ' So this is operations. Operations.


An array is contiguous blocks of memory, i. e the capacity to store 6
elements. The base address will be the address of that first element ,
That the array is pointing towards So this is a pointer that will store
its address Whatever is my first element, the one with 0th index. The
advantage I 'll get is If I ever want to make insertions in this array
Then I can move them a little , all the elements. But if I define the
array as big as I can I might have to make another completely new array.
And I think moving things a bit is better. We can implement this in any
programming language. The capacity of arrays is. . . In that , the
updation and access are very fast. So in arrays , the biggest advantage
is this : It is the fact that you can access the element ; You can
calculate from the base address. Assume there is a field in which
Starting from 1, at every kilometre , at every milestone there is. . . a
milestone 3. . . 4. . . 5. . . Okay ? Assume this is from Delhi. . . This
is our Delhi and assume there 's a route from here And from here, how
many kilometres away from here. We 'll set up our coding environment And
we 'll implement My Array on a structure. So I 'll quickly tell a little
bit of implementation in this video We 're going to code anyway. So in
the next video, we'll see its implementation and complete it. And I do
n't want to do it on the whiteboard.


Please keep liking this video. I just want you guys to like , and keep up
the enthusiasm. If you do that then I 'll be able to make such videos and

, these types of notes. I 've made these notes for you All the details are
there in here. It 'll never happen that you finished this course And you
have to watch these videos again after 6 months Because you'll have these
notes with you.

Geschreven voor

Vak

Documentinformatie

Geüpload op
4 april 2023
Aantal pagina's
12
Geschreven in
2022/2023
Type
OVERIG
Persoon
Onbekend

Onderwerpen

€7,45
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Maak kennis met de verkoper
Seller avatar
muhammadharoon3

Ook beschikbaar in voordeelbundel

Maak kennis met de verkoper

Seller avatar
muhammadharoon3 Exam Questions
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
-
Lid sinds
3 jaar
Aantal volgers
0
Documenten
7
Laatst verkocht
-

0,0

0 beoordelingen

5
0
4
0
3
0
2
0
1
0

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen