100% tevredenheidsgarantie Direct beschikbaar na je betaling Lees online óf als PDF Geen vaste maandelijkse kosten
logo-home
Summary Notes of DSA lecture 1 $8.19
In winkelwagen

College aantekeningen

Summary Notes of DSA lecture 1

 0 keer verkocht
  • Vak
  • Instelling

Lecture notes of 2 pages for the course Data structures and algorithms at Data structures and algorithms (Summary)

Voorbeeld 1 van de 2  pagina's

  • 18 maart 2023
  • 2
  • 2022/2023
  • College aantekeningen
  • Jenny's lectures cs it
  • 1
avatar-seller
Arrays in Data Structure | Declaration,
Initialization, Memory representation
At runtime, arrays can be initialized using loops and predefined functions
such as scanner. In the upcoming video, the methods for taking data from
a user and storing it in an array will be discussed, followed by topics on
inserting data and traversing arrays, including types of operations on a 1D
array and time taken for each operation. The video will also cover the
concept of a 2D array and how it can be accessed. Faerie explains the
need and concept of arrays in detail, highlighting how arrays can be
declared, initialized, and represented in memory. An array is a storage
space for multiple values, and while a variable can only store one value,
an array can store multiple values at once. For example, to store data for
60 students, one would need to take the approach of an array, rather than
creating 60 individual variables. In order to create an array, one must
declare the data type, array name, and size. The size must be a constant
and specific to the language being used. The syntax for array declaration
may differ depending on the programming language, but the concept
remains the same. Additionally, the memory representation of an array
and how data is stored in memory will be covered in the upcoming videos.
Furthermore, the upcoming video will focus on 1D arrays, with an example
array named variable B with a set size. The methods for accessing and
using variable B will be discussed, including the process of representing it
in memory.

Data is to be represented in memory or the memory representation of an
array. The need for ferry and how to deal with it is explained. The concept
of an array was introduced because of the large amount of data that
needed to be processed. The declaration syntax for arrays may vary
depending on the programming language being used. All elements in an
array are stored in consecutive or continuous locations one after another
in memory. The elements are stored in successive locations, and the
index starts from zero. The size of the array cannot be changed at
runtime, and at compile time, you specify what elements you want in the
array. During runtime, you can only store a fixed amount of elements. In
the case of a 5 by 4 array, which is a fixed-size array, 20 bytes are
allocated depending on the memory manager used. The memory manager
allocates consecutive bytes in successive locations for storing the
elements of the array. Dynamic arrays and other programming languages'
syntax for array declaration are discussed in later sections. The 6 in the
array is first converted to binary form and then stored in four bytes. To
calculate the address for the location, the formula is base address plus the
I value into the size of the array, which is a data type of 4 bytes. The
drawback of arrays is the wastage of space. The array follows the random
access method, meaning you can access any data with constant time if
you know the base address.

Dit zijn jouw voordelen als je samenvattingen koopt bij Stuvia:

Bewezen kwaliteit door reviews

Bewezen kwaliteit door reviews

Studenten hebben al meer dan 850.000 samenvattingen beoordeeld. Zo weet jij zeker dat je de beste keuze maakt!

In een paar klikken geregeld

In een paar klikken geregeld

Geen gedoe — betaal gewoon eenmalig met iDeal, creditcard of je Stuvia-tegoed en je bent klaar. Geen abonnement nodig.

Direct to-the-point

Direct to-the-point

Studenten maken samenvattingen voor studenten. Dat betekent: actuele inhoud waar jij écht wat aan hebt. Geen overbodige details!

Veelgestelde vragen

Wat krijg ik als ik dit document koop?

Je krijgt een PDF, die direct beschikbaar is na je aankoop. Het gekochte document is altijd, overal en oneindig toegankelijk via je profiel.

Tevredenheidsgarantie: hoe werkt dat?

Onze tevredenheidsgarantie zorgt ervoor dat je altijd een studiedocument vindt dat goed bij je past. Je vult een formulier in en onze klantenservice regelt de rest.

Van wie koop ik deze samenvatting?

Stuvia is een marktplaats, je koop dit document dus niet van ons, maar van verkoper thecarguy177. Stuvia faciliteert de betaling aan de verkoper.

Zit ik meteen vast aan een abonnement?

Nee, je koopt alleen deze samenvatting voor $8.19. Je zit daarna nergens aan vast.

Is Stuvia te vertrouwen?

4,6 sterren op Google & Trustpilot (+1000 reviews)

Afgelopen 30 dagen zijn er 65040 samenvattingen verkocht

Opgericht in 2010, al 15 jaar dé plek om samenvattingen te kopen

Begin nu gratis

Laatst bekeken door jou


$8.19
  • (0)
In winkelwagen
Toegevoegd