تم الحل ✓
categoryعلوم الحاسوب
schoolبكالوريوس
event_available2026-07-14
السؤال
Transcribed Image Text:
1. (4 pts) Algorithmic Complexity
a. What is the asymptotic complexity (Big-O) of the function
b. What is the asymptotic complexity (Big-O) of the function
c. What is the asymptotic complexity (Big-O) of the function
d. What is the asymptotic complexity (Big-O) of the function
75+400n+7?
17n2+45n+ 55?
7n/2 + 210?
65032100 ?
୪୪୪୪
)
)
)
2. (6 pts) Calculate the asymptotic complexity of the code below (using Big-O notation) with
respect to the problem size n and identify the critical section (circle it) of each.
1. for (i=1; i<=n; i++) {
f(n) = O(
for (k=0; k<=n/2; k++) {
System.out.println("Hello");
}
}
2. for (int i=n-1; i<=n; i++) {
f(n) = O(
for (int j=1; j<=n; j-j*2) {
System.out.println("Hello");
}
}
3. for (int i=0; i < n; i++) {
f(n) = O(
}
System.out.println(i);
if (i = 2) {
}
break;
check_circle الجواب — حل مفصل خطوة بخطوة
hourglass_top
🔒
الحل الكامل متاح للمشتركين
اشترك في أرشيف الأسئلة لعرض هذا الحل وآلاف الحلول المفصلة خطوة بخطوة من معلمين معتمدين.