• Pada Algoritma pencarian banyak yang bisa kita temukan atau gunakan. Ada Merge Sort, Quick Sort, Bubble Sort, dan...
  • Pada dasarnya algoritma searching banyak kita jumpai. Apalagi hanya untuk mencari nilai minimum dan nilai maximum...
  • Kalian pasti sudah tahu apa itu Deret Fibonacci, ya benar. (Padahal gak jawab). Tetapi pada pembahasan kali ini kita akan membuar program...
  • Metoda Pencarian Biner ( Binary Search) hanya bisa diterapkan jika data array sudah terurut. Pengurutan Array bisa menggunakan jenis sorting ...
  • Salah satu contoh tipe algoritma brute force lainnya adalah linear search (pencarian berurutan), Dikatakan demikian karena algoritma ini menggunakan ...

Friday, May 27, 2011

Searching (Array One Dimension) : Finding a Number From Several Numbers


Still talking one-dimensional array problem. In the array much to do kit. From the most minor sort the numbers to the greatest or from greatest to smallest. Also we will discuss this time is to find a number of the many numbers entered.

For example there is input data 5, 6, 2, 4, 8. 5 will automatically be stored in the array index of 1, 6 will be stored in the array index 2, 2 will be stored in the array index of 3, 4 will be stored in the array index 4, 8 will be stored in the array index 5, with our record array indices start from 1 . Because the default array index starts from 0.

Because there is an array index we can find a number that is located on an array index. As an example we look for number 2. Algorithm that is where all the numbers look the same with blangan to be searched. If you've met the index of an array of printing as a result of the position of the storage array. So number 2 is located at position 3 of a series that included bilagan.

The program can be created like this:

Learn to be tried can be downloaded from ziddu. For the sake of others you can modify the program so that it can be used as appropriate.

Sumonggo!

Jadilah yang pertama mengomentari

Post a Comment

Tutorial Algorithm and Programming ©Template Blogger Green by Dicas Blogger.

To Up