数据结构与算法代写 | COMPUTER SCIENCE Algorithms and Data Structures I

本次英国代写是数据结构与算法的限时测试

PART A

Candidates should answer ALL of Question 1 in Part A.

Question 1 If instructed to choose only one option, do not choose multiple
options. If you select multiple options, your answer will be marked as 0. If
otherwise instructed to select all options that apply, there will be multiple correct
options, but you can lose marks for selecting incorrect options.

(a) Consider the following problem:

Given a non-negative integer n, is n2 odd?

Which of the following is the type of the expected output for this problem?
Choose only one option. [3]

i. Integer
ii. A fraction
iii. Boolean
iv. None of the above.

(b) Which of the following statements describes what an algorithm is? There
is only one correct answer. [2]

i. An algorithm is only a method for checking if computer programs are
correct.
ii. An algorithm is only a method for finding if a number is an integer.
iii. An algorithm is a method of step-by-step basic instructions which, if
followed, solves a problem.
iv. An algorithm is a set of problems that can be solved by a computer.

(c) Consider the following piece of pseudocode:

1: x 2
2: x x + 2
3: function CHECK(n)
4: if n=2 then
5: n n + 1
6: end if
7: return n ” 1
8: end function
9: x CHECK(x)
10: x CHECK(x)

i. What is the value of x at the end of line 1? [1]
ii. What is the value of x at the end of line 2? [1]
iii. What is returned by CHECK(2)? [1]
iv. What is the value of x at the end of line 9? [1]
v. What is the value of x at the end of line 10? [1]


程序代写代做C/C++/JAVA/安卓/PYTHON/留学生/PHP/APP开发/MATLAB


本网站支持淘宝 支付宝 微信支付  paypal等等交易。如果不放心可以用淘宝交易!

E-mail: itcsdx@outlook.com  微信:itcsdx


如果您使用手机请先保存二维码,微信识别。如果用电脑,直接掏出手机果断扫描。

blank

发表评论