Question: Consider the following method: public void v ( String a [ ] ) { for ( int i = 0 ; i < a .

Consider the following method:
public void v(String a[]){
for(int i =0; i < a.length; i++){
a[i]= reverse(a[i]);
}
}
Assume that the method reverse() has a time complexity of O(n). If we use the active operation approach to determine the time complexity of this method, which line should we choose as the active operation?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!