Question: 1. Find the complexity of the algorithm as Big O notation: countValue(a, n, val) { count=0 for i=1 to n{ if (a[i]=val) count=count+1 } return
1. Find the complexity of the algorithm as Big O notation: countValue(a, n, val) \{ count=0 for i=1 to n{ if (a[i]=val) count=count+1 \} return count \}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
