I have this Question , I want the answer and show me how to solve it Please :

Analyze the running time of the following algorithm using Big-Oh notation

maxerea =0; maxpt1 =maxpt2 = maxpt3 =0;
for(i =1;i<=n;i++)
for(j =i+1;j<=n;j++)
   for(k =j+1;k<=n;k++){
       empty = True;
     for(l =1;l<=n;l++){
     if((l != i) && (l != j) && (l != k))
        if insideTriangle(i,j,k,l) then empty = False;
          area = TriangleArea(i,j,k);
        if (area < maxarea) {
            maxarea =area;
              maxpt1 = i; maxpt2 = j; maxpt3 = k;
  print, maxpt1, maxpt2, maxpt3

It would help if you gave us some more information about what it is about Big O notation that you find confusing. Where are you stuck? What, specifically, is confusing you that we can help with?

commented: how to compute the run time of nested for loop ? +0
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.