שאלה בתכנות

dan53

New member
שאלה בתכנות

you are given two arrays A[1...N] and B[1...N] of floats. You know that these arrays contain the same numbers but in different order. The arrays are not accessible directly, the only interface to them are through the following two functions: Less(i,j) that returns true if A<B[j] and false otherwise. Swap(Array ,i,j), when Array is either A or B .This function swaps elements Array and Array[j]. You have to sort array A in time O(NlogN). מי שיוכל לעזור לי עם זה יבורך.
 
למעלה