Q82
MCQ2 marks, −0.5Let be an array storing a bit ( or ) at each location, and is a function whose time complexity is . Consider the following program fragment written in a C like language: counter = 0; for (i=1; i<=n; i++) { if (a[i] == 1) counter++; else {f (counter); counter = 0;} } The complexity of this program fragment is
Sign in to save attempts.
Loading…