Download as pdf
Download as pdf
You are on page 1of 28
T S&S test cope 02215020 | FORM TP 2017180 MAY/JUNE 2017 CARIBBEAN EXAMINATIONS COUNCIL CARIBBEAN ADVANCED PROFICIENCY EXAMINATION® COMPUTER SCIENCE FURTHER TOPICS IN COMPUTER SCIENCE UNIT 2— Paper 02 2 hours 30 minutes READ THE FOLLOWING INSTRUCTIONS CAREFULLY. 1. This paper consists of SIX questions. Answer ALL questions | Write your answers in the spaces provided in this booklet 3. Do NOT write in the margins. 4, Ifyou need to rewrite any answer and there is not enough space to do so on the original page, you must use the extra lined page(s) provided at the back of this, booklet. Remember to draw a line through your original answer. 5. Ifyou use the extra page(s) you MUST write the question number clearly in the box provided at the top of the extra page(s) and, where relevant, include the question part beside the answer. DO NOT TURN THIS PAGE UNTIL YOU ARE TOLD TO DO So. ns Coun Copyright © 2016 Caribbean Examina All rights reserved. ieee ic a 0221602003, r “ a SECTION A DATA STRUCTURES Answer BOTH questions. 1. (@)_The following ten integers are stored in an array, arr. location [ 0 [| t | 2 [3 [4 fs [o6 [7 [so data s fu] 2 [iw [3s [a [sa [8 Tio [or (i) Write a series of steps to describe how the binary search algorithm will search arr for the key 19. [6 marks] (ii) State whether this search algorithm retums the correct location. Support your answer with an explanation, 12 marks} GO ON TO THE NEXT PAGE 02215020/CAPE 2017 [ie (A A a _| 0221502004 r “ 7 (b) The following five integers are stored in an array, arrBubble. location [0 | 1 [ 2 [ 3 [ 4 data 37_[ 23 | 34 | 3 [is Use the bubble sort to sort this array in ascending order. Draw the array after each complete pass of the bubble sort [3 marks} GO ON TO THE NEXT PAGE RB o2215020caPE 2017 AA le az1802005 i

You might also like