Looking for 25_HESSO-VS_SI_Informatique SYND test answers and solutions? Browse our comprehensive collection of verified answers for 25_HESSO-VS_SI_Informatique SYND at cyberlearn.hes-so.ch.
Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!
What is the Big O space complexity of this algorithm?
Example:
int n = 10;float sum = 0.0f;
for (int i = 0; i < n; i++) { int k = i*2 + i - n; sum += (float)k + 1.0f;}System.out.println(sum);
What is the Big O time complexity of this algorithm?
Example:
for (int i = 0; i < n; i++) { for (int j = 0; j < 1; j++){ for (int k = 0; k < 1; k++){ System.out.println("Hello World!"); } }}
What is the Big O time complexity of this algorithm?
Example:
for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++){ int k = i*2 + j - n; System.out.println("Hello World!"); }}
What is the Big O space complexity of this algorithm?
Example:
int n = 10;float[] sum = new float[n];
for (int i = 0; i < n; i++) { sum[i]= (float)52 * (float)i + 1.0f;}System.out.println(sum[n-1]);
What is the Big O time complexity of this algorithm?
i = 0;while (i < n) { if (i == 3) { for (int j = 0; j < n; j++){ System.out.println("Hello World!"); } }}
Which of the following suggested variable names are correct?
What is the space complexity (BigO) of this algorithm?
Note: the algorithm is described in pseudo-code. The input array arr is an array of size 40In your calculation, do NOT consider the space used by the input array.
bubbleSort(arr) n <- arr.length for i from 0 to n - 1 for j from 0 to n - i - 1 if arr[j] > arr[j + 1] swap(arr[j], arr[j + 1])