Submitted Questions

  • C Coding question on running time program

    /*assume contents are sorted*/Public static intbinarySearch(int x,int a[]){int low=0; 0(1)int high=a.length-1; 0(1)int mid; 0(1)while(low>x;while(x!=99){n++; 0(1)sum+=x; 0( n/x)cin>>x;}mean - sum/n;what is the running time?Please help me understand it. The websites are not that helpful to me. Please. Please if you're not that busy can you please answer it with explanations?:) :) :) THANK YOU!!

    Sereche

    • Jul 9th, 2012

    This seems to be a question about time complexity / big-O notation. Time complexity basically tells you how the program running time scales, as a function of one of the variables of input (in most cas...