Selasa, 20 Februari 2018

1-Chandra Delon-2101662013

1-Review Array, Pointer, Data Structure & Linked List
          Array adalah kumpulan elemen data yang memiliki tipe data yang sama contohnya : seperti data yang dideklarasi pada variable abc berikut
int x[5] ; maka variable x itu memiliki 4 buah array yang memiliki tipe data yang sama yaitu integer.
Bebek
Berikut jenis-jenis Array:
-One Dimensional Array
Declaration:
int arr[5];
Accessing:
arr[0] = 7;
arr[1] = 2;
arr[2] = 13;
arr[3] = 13;
arr[4] = 13;
          -Two Dimensional Array
          Declaration:
int arr[3][6];
Accessing:
arr[0][2] = 2;
arr[2][1] = 9;
arr[1][5] = 13;
arr[2][4] = 10;
-Multi Dimensional Array
Declaration:
int arr[4][3][7][10];
Accessing:
arr[0][2][2][9]= 2;
arr[2][1][6][0]= 9;
arr[3][0][0][6]= 13;
arr[2][1][3][8]= 10;
Pertanyaan Dosen Kelas Besar : Berapa maksimal dari dimensi array?
Jawaban dari saya : Maksimal dimensi dari array itu tergantung dari seberapa kuat CPU kita untuk memproses array-array tersebut.
Pointer adalah tipe data yang nilainya diambil dari nilai address yang terletak di memori komputer
Berikut contoh-contoh pointer :
If we have the declaration:
          int x;
          int *px;
then x is an integer and px is a pointer to an integer. If we say:
          px  = &x;
then &x returns the address of x and assigns it as the value of px.
To assign a value of x we can say
          x = 10;
or
          *px = 10;
Pertanyaan Dosen Kelas Besar : Apa fungsi dari single pointer dan double pointer dan apa maksimal dari pointer? Single Pointer digunakan untuk menyimpan alamat selanjutnya dari sebuah data, sedangkan Double pointer digunakan untuk menyimpan alamat sebelumnya dan juga yang selanjutnya.
Maksimal dari pointer itu tak terhingga.


Data Structure adalah data yang diatur didalam memori computer atau disk storage.
Beberapa contoh data structure yang sederhana :
-Arrays
-Linked lists
-Queues
-Stacks
-Binary Trees
-Hash Tables

-Array :

-Linked Lists (Data structure yang dinamis yang elemennya dapat di tambah atau dihapus sesuai dengan keinginan):

-Queue(First in First out[FIFO])



-Stacks(Last in First Out[LIFO] / First In Last Out[FILO])


-Binary Trees(Data structure yang di artikan sebagai kumpulan elemen yang dipanggil the Nodes.
















Data Type is a collection of objects and a set of operations that act on those objects.
For example, the data type int consists of:
objects  : 0, +1, -1, +2, -2, etc
operations  : +, -, *, /, %, etc
Example of predefined data types are int, char, float.
Abstract Data Type (ADT) is a data type that is organized in such a way that the specification of the objects and the specification of the operations on the objects is separated from the representation of the objects and the implementation of the operations.
C/C++ has a concept called class and struct which assist the programmer in implementing abstract data type.


Introduction to Linked List
Structure is basically a user-defined data type that can store related information (even of different data types) together, while an array can store only entities of same data types.
It is a collection of variables under a single name.
The variables within a structure are of different data types and each has a name that is used to select it from the structure.
Structure Declaration :
struct tdata {
  int   age;
  char  name[100];
  float score;
};
The code above defines a structure named tdata which has three members: age (int), name (char[]) and score (float).
Creating a variable of structure is similar to create a variable of primitive data type.
  tdata x;    // a variable of tdata
  tdata arr[100];  // an array of tdata


Rangkuman dari presentasi pembicara :
Menjelaskan pentingnya data struktur, dan apa saja manfaat dari data struktur, dan cara pakai data struktur untuk dalam berbisnis / investasi.
Contohnya : Mengambil data-data dan menjualnya dan juga bisa digunakan untuk membuat suatu cryptocurrency, cryptocurrency yang paling terkenal saat ini bernama bitcoin ternyata juga menggunakan ilmu data struktur.


Tidak ada komentar:

Posting Komentar