عرض مشاركة واحدة
قديم 2012- 5- 16   #3
bassmah
أكـاديـمـي فـعّـال
الملف الشخصي:
رقم العضوية : 3157
تاريخ التسجيل: Mon Dec 2007
المشاركات: 277
الـجنــس : أنـثـى
عدد الـنقـاط : 115
مؤشر المستوى: 77
bassmah will become famous soon enoughbassmah will become famous soon enough
بيانات الطالب:
الكلية: كلية التربية بالجبيل
الدراسة: انتظام
التخصص: حاسب الي
المستوى: المستوى الثامن
 الأوسمة و جوائز  بيانات الاتصال بالعضو  اخر مواضيع العضو
bassmah غير متواجد حالياً
رد: ^^^^محاضرة searching algorithms 11 وش المهم اللي فيها ^^^^

>> طيب اشرحوا لي النقاط هذي ::

فكرة عمل الخوارزم ::


كود:
Algorithm
Algorithm is quite simple. It can be done either recursively or iteratively:
1.       get the middle element;
2.       if the middle element equals to the searched value, the algorithm stops;
3.       otherwise, two cases are possible: 
o    searched value is less, than the middle element. In this case, go to the step 1 for the part of the array, before middle element.
o    searched value is greater, than the middle element. In this case, go to the step 1 for the part of the array, after middle element.

التعديل الأخير تم بواسطة bassmah ; 2012- 5- 16 الساعة 11:35 AM
  رد مع اقتباس