Answered step by step
Verified Expert Solution
Question
1 Approved Answer
What is the Big O of the alogorithm below? Please explain the Big O answer. #include using namespace std; int main() { int n; int
What is the Big O of the alogorithm below? Please explain the Big O answer.
#include using namespace std; int main() { int n; int arr[100]; cout<<"enter the no of elements in array: "; cin>>n; //reading the size of array cout<<"Enter the elements int o array one by one "; for(int a=0;a { cin>>arr[a]; // reading elements into array one by one } for(int i=0;i {
for(int j=i+1;j {
for(int k=j+1;k { if(arr[i]+arr[j]+arr[k]==0) // condition to check whether the elements sum is zero or not { cout<<"{"<
return 0; }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started