Postingan

Menampilkan postingan dari Februari, 2018

pertemuan ke-2 - Single Link List - 2101640795 - Michael Kesta

Gambar
Single Linked List Single linked list is a sequence of elements in which every element has link to its next element in the sequence . In any single linked list, the individual element is called as  "Node" . Every  "Node"  contains two fields,  data  and  next . The  data  field is used to store actual value of that node and next field is used to store the address of the next node in the sequence. Example: Operation In a single linked list we perform the following operations... Insertion Deletion Display Before we implement actual operations, first we need to setup empty list. First perform the following steps before implementing actual operations. Step 1:  Include all the  header files  which are used in the program. Step 2:  Declare all the  user defined  functions. Step 3:  Define a  Node  structure with two members  data  and  next Step 4:  Define a Node pointer ' head ' and set it to  NULL . Step 4:  Implemen

pertemuan ke-1 - Introduction to Data Structure - 2101640795 - Michael Kesta

Gambar
Data Structure Array Review Array is a container which can hold a fix number of items and these items should be of the same type. Most of the data structures make use of arrays to implement their algorithms. Following are the important terms to understand the concept of Array. ·         Element  − Each item stored in an array is called an element. ·         Index  − Each location of an element in an array has a numerical index, which is used to identify the element. Array Representation Arrays can be declared in various ways in different languages. For illustration, let's take C array declaration. As per the above illustration, following are the important points to be considered. ·         Index starts with 0. ·         Array length is 10 which means it can store 10 elements. ·         Each element can be accessed via its index. For example, we can fetch an element at index 6 as 9. Array Declaration & Accessing array •      One Dimensional Ar