The two sorts that we looked at, the bubble sort and the selection sort, have a
ID: 3856538 • Letter: T
Question
The two sorts that we looked at, the bubble sort and the selection sort, have a Big O performance of Log_2 N N^2 (N^3 - 2N)/2 N The correct way to check for self-assignment in this operator void operator = (const MyClass & other) is if(this == & data) if(other == & this) if (other. capacity == capacity) if (this = & other) When an array is declared as int array[15]: the array will have indexes in the range [0, , 14] indexes in the range (1 .. 15] elements in the range of [0 .. 15] elements in the range [0 .. 14]Explanation / Answer
18)
option b : O(n^2)
bubble sort and selection sort both has worst time complexity of N^2
19)
option d : if(other == &this)
here in parameter, other is a name of local variable.
So it will be used to check if current object and other has same address or not.
20)
option a ) indexes in range[0....14]
index starts from 0 to n-1 if there are n elements.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.