Bài giảng Nhập môn lập trình: Contiguous Storage - Võ Quang Hoàng Khang
Số trang: 51
Loại file: pdf
Dung lượng: 1.36 MB
Lượt xem: 10
Lượt tải: 0
Xem trước 6 trang đầu tiên của tài liệu này:
Thông tin tài liệu:
Bài giảng Nhập môn lập trình: Contiguous Storage cung cấp nội dung chính như: Introduction to contiguous storage, arrays, one-dimensional Arrays, declaration, memory Allocation, initialization accessing elements, traversing, arrays are parameters of functions, searching, sorting,...
Nội dung trích xuất từ tài liệu:
Bài giảng Nhập môn lập trình: Contiguous Storage - Võ Quang Hoàng KhangNHẬP MÔN LẬP TRÌNHContiguous StorageArrays, Simple Data StructureContiguous StorageSearchingSortingNHẬP MÔN LẬP TRÌNHObjectives• How to manage a group of data?– Store– Input– Output– Search– Sort–…Contiguous Storage2NHẬP MÔN LẬP TRÌNHContent• Introduction to contiguous storage• Arrays• One-dimensional Arrays––––––––DeclarationMemory AllocationInitializationAccessing elementsTraversing1-D Arrays are parameters of functionsSearchingSorting• 2-D ArraysContiguous Storage3NHẬP MÔN LẬP TRÌNH1- Contiguous Storage• Commonly, a group of the same meaning elements areconsidered.• They are stored in a contiguous block of memory.• Ex: Group of 10 int numbers 40 bytes block isneeded.• Data are considered can be a group of some items whichbelong to some different data types Contiguousmemory block is partitioned into some parts which havedifferent size, one part for an item.• Data structure: A structure of data stored.• Array is the simplest data structure which contains someitems which belong to the same data type.• Common used operations on a group: Add, Search,Remove, Update, SortContiguous Storage4NHẬP MÔN LẬP TRÌNH2- ArraysArray: A groupof elementswhich belong tothe same datatype. Eachelement isidentified by it’sposition(index).indexa(array)051428315490a[3]element5276347218152980a[i] is an integercolumnmm[1][3]row• Dimension: Direction that is used to perform an action on array.• Number of dimensions: Number of indexes are used to specifyan element.• Common arrays: 1-D and 2-D arrays.• Name of an array: An array has it’s name.Contiguous Storage5
Nội dung trích xuất từ tài liệu:
Bài giảng Nhập môn lập trình: Contiguous Storage - Võ Quang Hoàng KhangNHẬP MÔN LẬP TRÌNHContiguous StorageArrays, Simple Data StructureContiguous StorageSearchingSortingNHẬP MÔN LẬP TRÌNHObjectives• How to manage a group of data?– Store– Input– Output– Search– Sort–…Contiguous Storage2NHẬP MÔN LẬP TRÌNHContent• Introduction to contiguous storage• Arrays• One-dimensional Arrays––––––––DeclarationMemory AllocationInitializationAccessing elementsTraversing1-D Arrays are parameters of functionsSearchingSorting• 2-D ArraysContiguous Storage3NHẬP MÔN LẬP TRÌNH1- Contiguous Storage• Commonly, a group of the same meaning elements areconsidered.• They are stored in a contiguous block of memory.• Ex: Group of 10 int numbers 40 bytes block isneeded.• Data are considered can be a group of some items whichbelong to some different data types Contiguousmemory block is partitioned into some parts which havedifferent size, one part for an item.• Data structure: A structure of data stored.• Array is the simplest data structure which contains someitems which belong to the same data type.• Common used operations on a group: Add, Search,Remove, Update, SortContiguous Storage4NHẬP MÔN LẬP TRÌNH2- ArraysArray: A groupof elementswhich belong tothe same datatype. Eachelement isidentified by it’sposition(index).indexa(array)051428315490a[3]element5276347218152980a[i] is an integercolumnmm[1][3]row• Dimension: Direction that is used to perform an action on array.• Number of dimensions: Number of indexes are used to specifyan element.• Common arrays: 1-D and 2-D arrays.• Name of an array: An array has it’s name.Contiguous Storage5
Tìm kiếm theo từ khóa liên quan:
Bài giảng Nhập môn lập trình Nhập môn lập trình Contiguous Storage Introduction to contiguous storage One DimensionalTài liệu liên quan:
-
Đề cương chi tiết học phần Cấu trúc dữ liệu và giải thuật (Data structures and algorithms)
10 trang 327 0 0 -
Bài giảng Nhập môn về lập trình - Chương 1: Giới thiệu về máy tính và lập trình
30 trang 176 0 0 -
Giáo trình nhập môn lập trình - Phần 22
48 trang 140 0 0 -
Bài giảng Nhập môn lập trình - Chương 12: Quản lý bộ nhớ
23 trang 66 0 0 -
Bài giảng Nhập môn lập trình: Bài 2 - Thuật toán
32 trang 39 0 0 -
Nhập môn lập trình (Đặng Bình Phương) - Các khái niệm cơ bản về hệ điều hành
17 trang 34 0 0 -
Câu hỏi bài tập nhập môn lập trình
11 trang 33 0 0 -
Bài giảng Nhập môn lập trình - Bài 3: Hệ điều hành
17 trang 33 0 0 -
Lecture Introduction to Programming: Lesson 1
19 trang 32 0 0 -
CÁC KHÁI NIỆM CƠ BẢN VỀ LẬP TRÌNH
21 trang 31 0 0