Upcoming SlideShare
×

# Data structures and algorithms lab6

1,236 views

Published on

0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

• Be the first to like this

Views
Total views
1,236
On SlideShare
0
From Embeds
0
Number of Embeds
931
Actions
Shares
0
12
0
Likes
0
Embeds 0
No embeds

No notes for slide

### Data structures and algorithms lab6

1. 1. DATA STRUCTURES AND ALGORITHMS LAB 6 Bianca Tesila FILS, March 2014
2. 2. OBJECTIVES  Linked Lists
3. 3. LINKED LISTS: INTRODUCTION  What is a list?  What is a linked list?
4. 4. LISTS: IMPLEMENTATION  Linked Lists  Each node contains the information and the link to its neighbors (doubly linked lists) or to the next element in the list (singly linked lists )  The nodes are allocated dynamically  Dynamic Arrays  The nodes are stocked in arrays  If, when adding a new element, the size of the array is exceeded, the array is reallocated What are the advantages and disadvantages of each implementation?
5. 5. LISTS: BASIC OPERATIONS o Add – adds an element (entity) to the list: at the beginning, at the end or at an arbitrary position o Remove – removes an element (entity) from the beginning/end of the list or by taking into account its index/content o Get – retrieves an element by taking into account its index o Update – updates the information/content of an element !! These operations depend on the chosen implementation.