Question: Analyze the algorithm given below according to the following items. 1. Determine the runtime function T (n) of the algorithm. 2. Express the Big O
Analyze the algorithm given below according to the following items. 1. Determine the runtime function T (n) of the algorithm. 2. Express the Big O notation of the function T (n) you have obtained.
Aada verilen algoritmann analizini aadaki maddelere gre yapnz. 1. Algoritmann alma zaman fonksiyonunu T(n) belirleyiniz. 2. Elde ettiiniz T(n) fonksiyonunun Big O notasyonunu ifade ediniz. void function(int n) { int sayac=0; for (int i=n/2; i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
