Posts

Sorting and Searching

Sorting Sorting needed to speed up searching operation. Sorting : Ascennding or Descending. Simple sorting : 1. Bubble sort : compare 2 neighboring values and swap if necessery. 2. Selection sort : find the smallest, after finished it swap. 3. Insertion sort Inetrmediate sorting: 1. Quick sort 2. Merge sort : is a sorting algorithm based on the divide-and-conquer algorithm. divide: divide the input data in two disjoint subsets. conquer: combine the solutions for each subset into a solution Searching Search is the process of finding a particular element of an array or finding a value that matches a certain key value. Key must be unique, means there must not be any same key in the data. Types of searching: 1. Linear Search :  Linear search compares each element of the array with the search key . the program will have to compare the search key with half the elements of the array. 2.Binary Search : For large arrays because it is more efficient. 3. Interpolation...

Clouds

Clouds refers to a network, which is present at certain place which accessible from any location over public or private network. Deployment examples : - Social networking (line, instagram, etc) - Data sharing (email, dropbox, etc) - Education (quipper, e-leaning, etc) - Business (online shop portal) - HPC for limited duration - etc Type of access : - Public - Private - Hybrid Deployment model in service model : - Infrastructure as a service (IaaS) - Platform as a service (PaaS) - Software as a service (SaaS) Usage of clouds: - Disaster recovery as a service - Backup as a service - Data as a service Relation between algorithm and clouds : Modern computation to solve problems mathematically using programming languages. Name : Samuel Xavier Widjaja NIM   : 2201737412 binus.ac.id

Algorithm & Programming (Array and Pointer)

Algorithm & Programming (Array and Pointer) Pointer Pointer is variable that store address of another variable. Pointer which is mostly used : *(content of) and &(address of). Example: int i, *ptr; ptr = &i; To assign a new value to the variable pointed by the pointer: * ptr = 5;   / * means i=5 */   Pointer to pointer is pointer for address to another pointer. Pointer constant :  a pointer that can be assigned with new value at run-time. Array is pointer constant. Pointer variable :  a pointer that can not be assigned with new value at run-time. Array Array is data saved to be access as a group or individually. Characteristic: 1. Homogenous = all element have similar data type. 2.Random access = doesn't have to be sequential. Array Initialization Example : B[4]={1,2,5,} One Dimensional Array Syntax:   type array_value [value_dim] ; Example : int number[10000]; Two Dimensional Array Syntax : type name_arr...

Algorithm and Programming (Repetition)

Algorithm & Programming (Repetition) Repetion is instructions that is repeated in a certain amount of time Repetion : 1. For 2. While 3. Do while 1. FOR for (exp1, exp2, exp3){        statements; } exp1 : initialization exp2 : condition exp3 : increment or decrement 2. WHILE Statement will never be executed if the expression false while (exp) statements; 3. DO WHILE Expression done after executing the statements. Statement will be executed minimum once. do {        statements;       }while(exp); References: Paul Deitel & Harvey Deitel. (2016). C how to program : with an introduction to C++. 08. Pearson  Education. Hoboken. ISBN: 9780133976892. Chapter 3 & 4 Doing the Same Thing Over and Over: http:// aelinik.free.fr /c/ ch07.htm NIM=2201737412 Name=Samuel Xavier Wdjaja binus.ac.id skyconnectiva