Helpdesk: WhatsApp: 0736552548 Email: info@kenyaplex.com

Array Search and Sort Algorithms, 2nd year DICT

Institution: The Nyandarua National Polytechnic

Course: Diploma in Information Communication And Technology

Content Category: College Schemes of Work

Posted By: mr Daniel

Document Type: DOCX

Number of Pages: 4

Price: KES 10
 
    

Views: 367     Downloads: 0

Summary

ARRAY SEARCH
This involves identifying a search value and march it with the other array contents to identify whether it is in that array or not.For example;
Binary Search coding
Set MIN_INDEX = LBound(Array)
Set MAX_INDEX = UBound(Array)

Do While MIN_INDEX <= MAX_INDEX
Set MIDDLE_INDEX = INT((MIN_INDEX + MAX_INDEX) / 2)
If SEARCH_ITEM < ARRAY_ITEM(MIDDLE_INDEX) Then
Set MAX_INDEX = MIDDLE_INDEX – 1
ElseIf SEARCH_ITEM > ARRAY_ITEM(MIDDLE_INDEX) Then
Set MIN_INDEX = MIDDLE_INDEX + 1
Else
' Item has been found at MIDDLE_INDEX of array
Exit Do
End If
Loop
SORTING ARRAYS
Sorting involves arranging array elements in a given order (like ascending or descending) and using a given criteria (like order of column).One of the simplest methods to sort an array is an insertion sort. An example of an insertion sort occurs in everyday life while playing cards. To sort the cards in your hand you extract a card, shift the remaining cards, and then insert the extracted card in the correct place. This process is repeated until all the cards are in the correct sequence.


Below is the document preview. Purchase to access the complete document.

  • Array-Search-and-Sort-Algorithms-2nd-year-DICT_10922_0.jpg
........

This is the end of this document preview. Buy to download the complete document.


More Resources


More Content By mr Daniel


  • System Analysis and Design Notes for KNEC Diploma in ICT

    Systems development is systematic process which includes phases such as planning, analysis, design, deployment, and maintenance. Systems Analysis It is a process of collecting and interpreting...

    Price: KES :  150

     
  • Visual Basic 6.0 Full Notes

    UNIT-2 VISUAL BASIC 6.0 Introduction: In the name of visual basic “visual” part refers to the method use to create graphical user interface (GUI). The basic parts refer to the basic...

    Price: KES :  150

     
  • Management Information Systems Notes

    COURSE: DIPLOMA IN INFORMATION COMMUNICATION TECHNOLOGY (ICT). (MODULE III- KNEC) UNIT NAME: MANAGEMENT INFORMATION SYSTEM. This notes have been compiled and edited based on knec past papers...

    Price: KES :  130

     
  • DICT Module III: Management Information Systems Notes

    This is the whole unit of management information system that has been compiled for making studying life of a student and trainers during study and revision. The success of any learner is based on...

    Price: KES :  150

     
  • Computer Applications I Notes

    WORD PROCESSORS Chapter outline: 1.1 Definition of word processor. 1.2 Purpose of word processing. 1.3 Using a word processing package (Microsoft word). 1.4 Editing and formatting a...

    Price: KES :  150

     
  • Operating Systems Notes for Diploma in Information Communication Technology

    Areas Covered: CHAPTER 1 SYSTEM SOFTWARE CHAPTER 2 FUNDAMENTAL OF OPERATING SYSTEM CHAPTER 3 PROCESS MANAGEMENT CHAPTER 4 THREAD MANAGEMENT CHAPTER 5 CONCURRENCY CONTROL CHAPTER 6...

    Price: KES :  180

     
  • Diploma in General Agriculture: Animal Production Notes

    The status and role of ruminant livestock in Kenya: Dairy Cattle Dairy production takes place all over the world but with different levels of development. In some countries dairy production is a...

    Price: KES :  150

     
  • Diploma in General Agriculture: Sample KNEC Revision Questions and Answers

    REVISION KNEC QUESTIONS MODULE 3 1. Define the term landslide. (2 marks) - A collapse of a mass of earth or rock from a...

    Price: KES :  40

     
  • Cyber security essentials and certification (Q&A in Ethics part ) Level 1

    Chapter 1:Ethics Questions And Answers Answers to the cyber security essentials questions on Cisco. Pass your exams with ease of revising using this questions which rarely change.They are just...

    Price: KES :  80

     
  • Answers for chapter 1 of Cyber Security Essentials level 1

    ITC – Introduction to Cyber security 2.1 ITC Chapter 1 Quiz Answers Answers for Cyber Security Essentials Chapter 1 that will help you pass your exams.Once you earn your certificate make sure you...

    Price: KES :  15

     
  • Diploma in ICT: Project Management Notes

    PROJECT MANAGEMENT CONTENT ? Meaning and importance of ICT project management ? ICT project management tools ? Criteria for evaluation ICT projects ? Signs of a failing ICT project ? Reasons for...

    Price: KES :  50

     
  • English Encyclopedia for Secondary Education

    INTEGRATED ENGLISH LITERATURE Introduction The teaching and learning of English as a second language entails that a learner does a lot of practice in the four key areas of: i) Listening ii)...

    Price: KES :  100

     
  • KNEC Based C++ Programming Notes Summary Module II

    This C++ notes are summarized with C programs, definition of constructors and variables to allow you as a learner to be able to make smart and strategic studies of this unit and be able to score a...

    Price: KES :  50

     
  • Diploma in ICT: Quickbooks Notes

    Diploma in ICT: Computer Application-Quickbooks Notes These notes are so helpful to the financial applications with necessary step by step instructions on how to solve problems of finance and...

    Price: KES :  100

     
  • Object Oriented Programming Notes on Polymorphism

    Polymorphism is an important concept of object-oriented programming. It simply means more than one form. That is, the same entity (function or operator) behaves differently in different scenarios.

    Price: KES :  50

     
  • Object Oriented Programming Notes on Variables, Literals and Constants

    Enhance your understanding of Variables, Literals, and Constants in Object Oriented Programming with comprehensive notes.

    Price: KES :  50

     
  • Chemistry Form 1, Form 2, Form 3 and Form 4 Notes

    This is one of the best summarized notes from form 1 to form four that have helped many students improve their performance in this subject. I understand that this subject is not easy to many of...

    Price: KES :  200

     
  • Form 1-4 Mathematics Questions With Answers

    Questions and answers for maths from form 1-4 which will guide you and simplify the way you understand the content.

    Price: KES :  200

     
  • Mas 309: Time Series Analysis and Forecasting Notes

    - Definition of time series - Importance of time series - Measurement of seasonal variation - Measurement of Regular, cyclical and irregular fluctuations - Second degree parabola - Measuring...

    Price: KES :  100

     
  • Building Services Notes

    Welding is the process of joining together two pieces of metal so that bonding takes place at their original boundary surfaces. When two parts to be joined are melted together, heat or pressure or...

    Price: KES :  180

     
View all resources