Question: f l o a t u s e l e s s (A){ n = A . le n g t h ; i f

f l o a t u s e l e s s (A){ n = A . le n g t h ; i f (n==1){ r e t u r n A [ 0 ] ; } // l e t A1 , A2 be a r r a y s o f s i z e n/2 f o r ( i =0; i <= (n/2)1; i++){ A1[ i ] = A[ i ] ; A2[ i ] = A[n/2 + i ] ; } f o r ( i =0; i <=(n/2)1; i++){ f o r ( j=i +1; j <=(n/2)1; j++){ i f (A1[ i ] == A2[ j ] ) A2[ j ] = 0 ; } } b1 = u s e l e s s (A1 ) ; b2 = u s e l e s s (A2 ) ; r e t u r n max( b1 , b2 ) ; }

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!