Chapter 11 Data Structures.

Slides:



Advertisements
Similar presentations
11 Data Structures Foundations of Computer Science ã Cengage Learning.
Advertisements

Linked Lists Linked Lists Representation Traversing a Linked List
Chapter 9: Advanced Array Manipulation
©Brooks/Cole, 2003 Chapter 11 Data Structures. ©Brooks/Cole, 2003 Understand arrays and their usefulness. Understand records and the difference between.
©Brooks/Cole, 2003 Chapter 11 Data Structures. ©Brooks/Cole, 2003 Data Structure Data structure uses collection of related variables that can be accessed.
Summary of lectures (1 to 11)
Computer Science: A Structured Programming Approach Using C1 Objectives ❏ To understand the basic concepts and uses of arrays ❏ To be able to define C.
CHP - 9 File Structures. INTRODUCTION In some of the previous chapters, we have discussed representations of and operations on data structures. These.
Introduction to Data Structures. Definition Data structure is representation of the logical relationship existing between individual elements of data.
Chapter 8 Data Abstractions Introduction to CS 1 st Semester, 2015 Sanghyun Park.
Graphing. Organizing Data A graph is a pictorial representation of information recorded in a data table. It is used to show a relationship between two.
Arrays. Introduction This chapter serves as an introduction to the important topic of data structures. Arrays are data structures consisting of related.
Organizing Data A graph is a pictorial representation of information recorded in a data table. It is used to show a relationship between two or more factors.
Working with Charts and Graphics CREATING CHARTS Lesson 6 - Microsoft Excel 2010.
The List ADT A sequence of zero or more elements A 1, A 2, A 3, … A N-1 N: length of the list A 1 : first element A N-1 : last element A i : position i.
1 Objectives ❏ To understand the basic concepts and uses of arrays ❏ To be able to define C arrays ❏ To be able to pass arrays and array elements to functions.
© Copyright McGraw-Hill CHAPTER 2 Frequency Distributions and Graphs.
Chapter 11 Data Structures. Understand arrays and their usefulness. Understand records and the difference between an array and a record. Understand the.
Chapter 3 Graphs and Charts. Agenda Chart Object linking and embedding.
Department of Computer Science 1 Some Practice Let’s practice for the final a little bit. OK?
Circular linked list A circular linked list is a linear linked list accept that last element points to the first element.
Data Structure and Algorithm: CIT231 Lecture 3: Arrays and ADT DeSiaMore DeSiaMorewww.desiamore.com/ifm1.
REEM ALMOTIRI Information Technology Department Majmaah University.
1 M I DAABO COURSE CODE: CSC 355 COURSE TITLE: Data Structures.
Computer Science: A Structured Programming Approach Using C1 Objectives ❏ To introduce the basic concepts of linked lists ❏ To introduce the basic concepts.
Linked list: a list of items (nodes), in which the order of the nodes is determined by the address, called the link, stored in each node C++ Programming:
PREPARED BY: PN. SITI HADIJAH BINTI NORSANI. LEARNING OUTCOMES: Upon completion of this course, students should be able to: 1. Understand the structure.
Graphs & Charts. Graphs Graphs are pictorial representation of relationship among numeric data. Graphs are pictorial representation of relationship among.
Data Structures: A Pseudocode Approach with C 1 Chapter 5 Objectives Upon completion you will be able to: Explain the design, use, and operation of a linear.
UNIT-V ABSTRACT DATA TYPE 1.LIST 2.STACK 3.QUEUE EC6301-II-ECE-C.
Link Based Implementations
Histogram The data must be in Frequency Distribution (see presentation if needed) form for Excel to draw a histogram Make your Frequency Distribution active.
Unit – I Lists.
CHP - 9 File Structures.
CSCI-255 LinkedList.
Big-O notation Linked lists
Review Deleting an Element from a Linked List Deletion involves:
Frequency Distributions and Graphs
Computer Programming BCT 1113
Microsoft Visual Basic 2005: Reloaded Second Edition
Data Structure and Algorithms
Chapter 15 Lists Objectives
Collection in PL/SQL.
UNIT-3 LINKED LIST.
Chapter 8 Arrays Objectives
Topics discussed in this section:
Chapter 14: Dynamic Data Structures
Chapter 15 Lists Objectives
Sparse Tables A sparse table refers to a table that is populated sparsely by data and most of its cells are empty With a sparse table, the table can be.
Topics discussed in this section:
Chapter 8 Arrays Objectives
Introduction to Data Structures
11-3 LINKED LISTS A linked list is a collection of data in which each element contains the location of the next element—that is, each element contains.
Chapter 7 Part 2 Edited by JJ Shepherd
D2 Indices and matrices Matrix representation in computer systems:
Chapter 17: Linked Lists.
Chapter 11 Data Structures 1.
Objectives In this chapter, you will: - Learn about records (structs) - Examine operations on a struct - Manipulate data using a struct - Learn about the.
Multidimensional array
Arrays Week 2.
Introduction to Data Structures
Binary Search Trees Chapter 7 Objectives
Chapter 8 Arrays Objectives
Data Structures & Algorithms
Chapter 5 Linked Lists © 2011 Pearson Addison-Wesley. All rights reserved.
C++ Array 1.
Linked Lists list elements are stored, in memory, in an arbitrary order explicit information (called a link) is used to go from one element to the next.
LINEAR DATA STRUCTURES
Variable Storage Memory Locations (Logical) Variable Classes Stack
Chapter 6 - Arrays Outline Multiple-Subscripted Arrays.
Presentation transcript:

Chapter 11 Data Structures

OBJECTIVES After reading this chapter, the reader should be able to: Understand arrays and their usefulness. Understand records and the difference between an array and a record. Understand the concept of a linked list and the difference between an array and a linked list. Understand when to use an array and when to use a linked-list.

Data Structure Uses a collection of related variables that can be accessed individually or as whole. Represents a set of data items with specific relationship between them. Three types data structures : Arrays Records Linked lists

11.1 ARRAYS

array Is a fixed-size, sequenced collection of elements of the same data type. It is sequenced collection, so we identify the elements as first element, second element .. N element.

Twenty individual variables Figure 11-1 Twenty individual variables

Processing individual variables Figure 11-2 Processing individual variables

Arrays with subscripts and indexes Figure 11-3 Arrays with subscripts and indexes

Figure 11-4 Processing an array

Array Applications Frequency array Graphical representation

Frequency array Show the number of elements with the same value found in a series of numbers

Figure 11-5 Frequency array

Histogram Pictorial representation of a frequency array Printing the value of the elements to show the frequency of number in bar chart. Its called one-dimensional arrays because the data are organized linearly Two-dimensional array represent rows and column

Figure 11-6 Histogram

Two-dimensional array Figure 11-7- Part I Two-dimensional array

Figure 11-8 Memory layout

11.2 RECORDS

Records A collection of related elements, possibly of different types, having a single name Each element in a record is called a field A field : smallest elements of named data that has meaning Difference between array and records : all elements in array must be of the same type, elements in record can be the same or different types.

Figure 11-9 Records

Note: The elements in a record can be of the same or different types. But all elements in the record must be related.

11.3 LINKED LISTS

Linked list An ordered collection of data in which each element contains the location of the next elements Each elements contains two parts Data : holds the useful information, the data to be processed Link : to chain the data together

Figure 11-10 Linked lists

Figure 11-11 Node

Figure 11-12 Inserting a node

Figure 11-13 Deleting a node

Figure 11-14 Traversing a list