logo

Crowdly

25_HESSO-VS_SI_Informatique SYND

Шукаєте відповіді та рішення тестів для 25_HESSO-VS_SI_Informatique SYND? Перегляньте нашу велику колекцію перевірених відповідей для 25_HESSO-VS_SI_Informatique SYND в cyberlearn.hes-so.ch.

Отримайте миттєвий доступ до точних відповідей та детальних пояснень для питань вашого курсу. Наша платформа, створена спільнотою, допомагає студентам досягати успіху!

What is the space complexity (BigO) of this algorithm?

Note: the algorithm is described in pseudo-code. 'directory' is the path (String) to a folder containing n images.

In your calculation, do NOT consider the space used by the input array.

An 'image' is a an array of size [512][512][3] (width, height, channels)

loadImages(directory)

    images <- empty list

    files <- list all files in directory

    for each file in files

        image <- load file into memory

        images.append(image)

    return images

0%
0%
0%
0%
0%
Переглянути це питання

What is the Big O time complexity of a loop that iterates until a certain condition is met, where the condition is checked within the loop?

Example :

//...

Scanner scanner = new Scanner(System.in);

int number;

do {

    System.out.print("Enter a positive number: ");

    number = scanner.nextInt();

    } while (number <= 0);

System.out.println("You entered: " + number);

//...

0%
0%
0%
100%
Переглянути це питання

What is the Big O time complexity of a loop that iterates n times and where the complexity of operations increases linearly with each iteration?

Example :

for (int i = 0; i < n; i++) {

   for (int j = 0; j < i; j++) {

      System.out.println("Hello World!");

   }

}

0%
100%
0%
0%
Переглянути це питання

What is the Big O time complexity of a loop that iterates n times and performs constant operations in the body of the loop?

Example:

for (int i = 0; i < n; i++) {

    System.out.println("Hello World!");

}

0%
0%
0%
100%
Переглянути це питання

Quelle est la complexité spatiale de cet algorithme (Big O) ?

Wie hoch ist die räumliche Komplexität dieses Algorithmus (Big O)?

Exemple/Beispiel:

int[][][] list = new int[3][2][1];

for (int i = 0; i<list.length; i++){

for (int j = 0; j<list[i].length; j++){

int sum = 0;

for (int k = 0; k<list[i][j].length; k++){

sum += k;

}

list[i][j][0] = sum;

}

}

0%
0%
100%
0%
Переглянути це питання

Quelle est la complexité spatiale de cet algorithme (Big O) ?

Wie hoch ist die räumliche Komplexität dieses Algorithmus (Big O)?

Exemple/Beispiel:

int[][] list = new int[n][3*n];

for (int i = 0; i<list.length; i++){

for (int j = 0; j<list[i].length; j++){

int sum = 0;

for (int k = 0; k < n; k++){

sum += k;

}

list[i][j] = sum;

}

}

Переглянути це питання

Quelle est la complexité spatiale de cet algorithme (Big O) ?

Wie hoch ist die räumliche Komplexität dieses Algorithmus (Big O)?

Exemple/Beispiel:

ArrayList<Integer> list = new ArrayList<>();

Random rand = new Random();

for (int i = 0; i<n; i++){

list.add(rand.nextInt());

}

System.out.println(list);

Переглянути це питання

Quelle est la complexité en temps de cet algorithme (Big O) ?

Wie hoch ist die Zeitkomplexität

dieses

Algorithmus (Big O)?

Exemple/Beispiel:

int j = 0;

int x = 0;

do {

x = 5*j - 2;

j++;

} while (x >= 0);

Переглянути це питання

Quelle est la complexité en temps de cet algorithme (Big O) ?

Wie hoch ist die Zeitkomplexität

dieses

Algorithmus (Big O)?

Exemple/Beispiel:

boolean condition = true;

int i = 0;

while (condition){

System.out.println("Step: " + i++);

if (i == 4*n){

condition = false;

}

}

Переглянути це питання

Quelle est la complexité en temps de cet algorithme (Big O) ?

Wie hoch ist die Zeitkomplexität

dieses

Algorithmus (Big O)?

Exemple/Beispiel:

String stars = "";

for (int i = 0; i < n; i++) {

    for (int j = 0; j < n; j++){

        for (int k = 0; k < 4; k++){       

            stars += "*";

        }

    }

}

System.out.println(stars);

Переглянути це питання

Хочете миттєвий доступ до всіх перевірених відповідей на cyberlearn.hes-so.ch?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!