Question: Given the following algorithm: Gegeben sei der folgende Algorithmus: module alg(a: ARRAY(1..n) [Integer]) var i, j, c: Integer; i := 56; while in do

Given the following algorithm: Gegeben sei der folgende Algorithmus: module alg(a: ARRAY(1..n) [Integer]) var i, j, c: Integer; i := 56; while in do C := 16; while c 0 do j := n div 3; while j > 0 do a[j]=ix c-j; a[2]] := ix c + j; j==j-1 endwhile; c:= c - 1; endwhile; i := i +2 endwhile endmodule Task: State for each loop how often it is executed and of which asymptotic time complexity the loop condition and body are for inputs of size n. Determine from this the asymptotic time complexity of the entire algorithm for inputs of size n.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
