This is a in-depth lecture summary for the course Data Structures & Algorithms in the Artificial Intelligence Bachelor from Vrije Universiteit Amsterdam. This will help you as the exam is largely based on the lectures and the lecture slides, which this covers thoroughly.
In the RAM model of computation ,
it is assumed that the CPU
has and that primitive take constant
some
memory operations a
amount of time .
Data structure : a structure to store and
organize data in the
memory in order to facilitate access and modifications
Algorithm : an
unambiguous way for doing a task , which takes
input and output ( finishes the task)
an produces an .
A
primary goal of designing data structures is to speed up
algorithms If the data is not well
organized in the
.
memory ,
it will take to
longer for the
algorithm be completed .
,Arrays and Linked Lists
Array :
represents a contagious portion of the
memory
:
all
elements in stored next in the
an
array are to each other
memory
Advantages :
very quick to
get an access to an element of
an
array , by knowing the index of the element .
insert I delete
Disadvantages : Hard to items into the
array , as
need place to all the elements to make
you a move
place or to move them back .
linked lists
Singly
-
Elements are stored in
arbitrary places in the
memory
and point
they to each other
A node in a list contains :
I , a data element V - data
2. a pointer v. next to the next node of the list
in the last node of the list ,
the
pointer is None or
nveeptr
Insert nodes
, Removing nodes
Doubly linked lists
A contains :
node v in a
doubly linked list
-
I .
a data element v. data
2. a pointer v. next to the next node in the list
3. a pointer v .
prev to the previous node in the list
Inserting a node
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller marinamssantos. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $13.45. You're not tied to anything after your purchase.