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
Buy with Email    Buy via WhatsApp
    

Views: 272     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 Class and Objects

    This chapter of object oriented programming is one of those that makes one to make a good score in the examinations considering that writing programs in exams carries a lot of weight in contributing...

    Price: KES :  20

  • 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

  • Workshop Technology Notes For Diploma in Building and Civil Engineering Module

    General objectives: At the end of this module/stage unit the trainee should be able to: (a) Observe safety rules and regulations in the workshop (b) Acquire knowledge of electrical engineering...

    Price: KES :  180

  • Industrial Machines and Controls Notes on DC Motors

    INDUSTRIAL MACHINES AND CONTROLS SUB-TOPIC: DC MOTORS Objectives By the end of the subtopic the trainee should be able to: i. Explain the principle of operation of DC motors ii. Explain at least...

    Price: KES :  40

  • Electrical Final Circuits Notes for Electrical Installation Technology I

    ELECTRICAL INSTALLATION TECHNOLOGY I ELECTRICAL FINAL CIRCUITS Definition Final circuit - a Circuit which supplies Appliances (normally via socket-outlets or other types of connectors) Types of...

    Price: KES :  100

  • Estimating and Costing I Notes for Diploma in Surveying

    Course Content: Topic 1: Site and office procedure. (16 hrs) Topic 2: Introduction to estimating (6 hrs) Topic 3: Approximate estimating (18 hrs) ROLE OF QUANTITY SURVEYOR Measurement work...

    Price: KES :  50

  • Workshop Technology Notes on Ferrous Metals

    FERROUS MATERIALS INTRODUCTION · Engineering materials used in manufacture of articles or products, dictates which manufacturing process or processes are to be used to provide it the desired...

    Price: KES :  30

  • Diploma in Quantity Surveying -Theodolite Notes

    This are the best summarized notes for survey that provides the learner with a broader and yet a clear understanding of operating theodolites. It is also best suites for KNEC revision purposes.

    Price: KES :  50

  • Certificate in Plumbing Module 1 Notes

    Piping and drainage are two essential practices in every country. These notes provide skills to perform this tasks with ease and perfection. Also forms a good base for KNEC...

    Price: KES :  150

  • Diploma in Building Technology: Workshop Technology Notes

    These are workshop notes for building and construction technology that enables the students to do their revisions with ease and short time. Workshop Safety Precautions - Wear tight clothes. Loose...

    Price: KES :  180

  • Diploma in Information Communication Technology: Entrepreneurship Notes

    COURSE OUTLINE 1. ENTREPRENUERSHIP- definition of terms -contribution of entrepreneurship towards national development -self-employment verses salaried employment 2. EVOLUTION OF...

    Price: KES :  100

  • Certificate in Plumbing: Plumbing Theory Notes

    Plumbing Theory Roles of the plumber 1.To Install, repair and maintain water treatment equipment. 2. To install, repair and maintain water heaters and conditioners 3. Fit and install firefighting...

    Price: KES :  100

  • Certificate in plumbing Notes: Module 1 (Plumbing Tools)

    Plumbing tools are one of the essentials that makes work simple and without them no work can be done.This notes provides their uses and where to apply each of them for better results.This tools are...

    Price: KES :  80

View all resources