What is the BigO of this program?
#include
int main() {
char data[] = {'a','b','c','d','e','f','g','h'};
for(int i = 0; i < sizeof(data); i++) {
if(data[i] == 'e') {
printf("e is found");
break;
}
}
} What is the BigO of this program?
#include
int main() {
char data[] = {'a','b','c','d','e','f','g','h'};
for(int i = 0; i < sizeof(data); i++) {
if(data[i] == 'e') {
printf("e is found");
break;
}
}
} Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Muhammad Imran AnsariPosted Jan 21, 2022, 8:17 PM