Selamat Datang Di Blog Kami Semoga Bermanfaat


Monday, February 15, 2010

Array in Data Structure

Array is a data structure that consists of many variables with the same data type, in which each element has a value of index variable. Each array element is able to store one type of data. Array is a type of structured data in the form of some kind of data (same data type) that the amount fixed and given a specific name. Array can be 1-dimensional array, 2-dimensional, even n-dimensional. Array is a static data structure, namely the number of elements that must be determined in advance, can not change when the program running. To declare arrays in PASCAL we must first: Defining the number of array elements.
Array Dimension One Dimension One Defining arrays in general is as follows: array with the type / the same type that has only one index is just a line or column only.
MultidimensiArray multidimensional array consists of one-dimensional, two-dimensional, three dimensional and so on. The first index can be a second line and could be a third column and the contents or any other form.
Record
A tape record compiled by several fields. Each field contains data of basic type / specific formation. Record has the advantage to save a set of data elements of different type (in appeal array).


In Indonesia Language please klik :
Indonesia Language

Thursday, February 4, 2010

Pointer In Data Structure

Pointer is a pointer variable which points to a specific computer memory address. Pointer is a low-level variables that can be used to denote integer values, character, float, double, or single, and even the data types other language supported by C. Ordinary variables, static in nature and certainly, while the pointer is dynamic in nature and can be more flexible. Pointer variable that does not point to any value that has a NULL value, and referred to as: Dangling pointer because its value is not in the initialization and can not be predicted. Pointer declaring variables using the sign (*) before the variable name, whereas to display the value pointed to by a pointer variable, also used the service (*) asterisk. If you want to show the address where the value of a variable by pointer, used the service (*) marks an ampersand. In an array of data types, Pointer variables need only point to his name only array variable without having to use an ampersand sign or point to a variable array at index zero is to it.

In Indonesia Language please klik :

 #Pointer  #Data Structure

Tuesday, February 2, 2010

Sort the Data Structure

Sort the data sorting process that previously arranged randomly, so be arranged on a regular basis according to a specific rule.
In general there are 2 types of Sort / sequencing:
. Ascending (Up)
. Descending (Decrease)

Data Ordering example:
. Random Data: 5 6 8 1 3 25 10
. Ascending Ascending: 1 3 5 6 8 10 25
. Ascending Descending: 25 10 8 6 5 3 1

Sort Method / Ordering Data
To make the ordering process can be used many different ways /
methods. Some methods include:
. Buble / Exchange Sort
. Selection Sort
. Insertion Sort
. Quick Sort

Bubble / Exchange Sort
) dari elemen berikutnya, maka tukar Proses Pengurutan Data paling akhir dibandingkan dengan data di depannya, jika ternyata lebih kecil maka tukar." onmouseover="this.style.backgroundColor='#ebeff9'" onmouseout="this.style.backgroundColor='#fff'">Moving elements are present with the following elements, if the element is now greater than (>) from the next element, then the exchange process at the end of Ordering Data compared to the data in front of him, if it is smaller then the exchange rate. And the same checks performed on data subsequent to the initial data.

Selection Sort
Comparing the current element with the next element until the last element. If you find another element that is smaller than the recorded elements position now and then exchanged. And so on.

Insertion Sort
Ordering is done by comparing the data to 1 (which starts from 1 to-2 data to final data) with the following data. If you found a smaller data so that data is inserted into the appropriate position should be.

Quick Sort
Comparing an element (called the pivot) with other elements and arranged them so that other elements are smaller than the pivot is located on the left and other elements are greater than the pivot is located on the right. And thus have formed two sublist, which is located on the left and right of pivot.Lalu the sublist left and right sublist we consider a new list and we do the same process as before. And so on until there is no longer sublist.
So that has occurred inside Recursive process.


In Indonesia Language please klik :
Indonesia Language

lwk

Related Posts Plugin for WordPress, Blogger...