Study sets
English

Fundamental Information Technology Engineer Examination (FE) | Section A Theory and Algorithms

1 / 40.0s

Problem 1 ・ Question 1 / 2

Which is the decimal number 13 expressed in binary?

View explanation

13 = 8 + 4 + 1 = 1101 in binary.

Problem 1 ・ Question 2 / 2

What is the largest unsigned integer that can be represented in one byte?

View explanation

Eight unsigned bits give 256 values, from 0 to 255, so the maximum is 255.

Problem 2 ・ Question 1 / 2

The pseudocode below computes the sum of the elements of array A. sum ← 0 i ← 1 while i <= n sum ← sum + A[i] i ← i + 1 endwhile

What is the time complexity of this algorithm?

View explanation

The loop runs n times, so the complexity is O(n).

Problem 2 ・ Question 2 / 2

The pseudocode below computes the sum of the elements of array A. sum ← 0 i ← 1 while i <= n sum ← sum + A[i] i ← i + 1 endwhile

How many times is the body of the while loop executed?

View explanation

i runs from 1 to n, so the body executes exactly n times.