Question: UINU3I 3HOW YOUR WORK TO GET MARKS 1. (5 marks) Perform a selection sort on the list 29,69, 37, 14,31, 10. Show the list after


UINU3I 3HOW YOUR WORK TO GET MARKS 1. (5 marks) Perform a selection sort on the list 29,69, 37, 14,31, 10. Show the list after each exchange that has an effect on the list ordering. 2. (5 marks) Do Exercise 12 from chapter 3 on page 142 (Exercise 10 from chapter 3 on page 140 in the sixth edition). The bubble-sort algorithm is shown just after question 10 (8 in the sixth edition). (5 marks) Write the resulting data list, give the ending value of legit, and find the exact number of copies done by the converging pointers algorithm when executed on this set of 3. data: 63 0 0 35 41 13 23 270 4. (5 marks) If the pattern-matching problem was changed to only find the first instance of a pattern of length m in the text of length n. (a) Describe the data that would cause the worst-case performance and the performance in terms of n. Use "Big-O" notation, e.g. en) n), etc. cause the best-case performance and the performance in terms of n. Use "Big-O" notation, e.g. (n), (n2), etc. (5 marks) Do Exercise 38 from Chapter 3 on page 147 (Exercise 33 from Chapter 3 on page 145 in the 6th edition). (5 marks) Calculate the decimal value of the following numbers. Show your work. 5. 6. (a) The base 5 number 342 (b) The base 6 number 415 (c) The base 16 hexadecimal number 7EAh (the h indicates hex) 7. (5 marks) Give the decimal value of the following numbers). Show your work. (a) The 2s complement number 01010101 (b) The 2s complement number 10101 101 6. (5 marks) Calculate the decimal value of the following numbers. Show your work. (a) The base 5 number 342 (b) The base 6 number 415 (c) The base 16 hexadecimal number 7EAh (the h indicates hex) 7. (5 marks) Give the decimal value of the following numbers) Show your work (a) The 2s complement number 01010101 (b) The 2s complement number 10101101 (d) The 2s complement number 10000111 (e) The a sign/magnitude number 10001101 (5 marks) Using the ASCII code given in Figure 4.3 on p. 165 (164 in 7th edition) give the binary representation for the phrase "li Pau, ignoring the quotation marks. Make sure to space each 8-bit ASCII code apart from the next so they are casy to read, eg 01000001 01100010 0100001I
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
