Answer:
def insSort(arr):
ct=0;
for i in range(1, len(arr)):
key = arr[i]
j = i-1
while j >=0 and key < arr[j] :
arr[j+1] = arr[j]
j -= 1
ct=ct+1;
arr[j+1] = key
return arr,ct;
print(insSort([2,1]))
Output of the program is also attached.
To <span>rite a statement that terminates the current loop when the value of the int variables x. and y.are equal please check below:
</span>
if (x == y) break; // exit loop
I hope the answer will help you. Thank you.
Answer: B) Vertical Partitioning
Explanation:
As, vertical partitioning is performed on Relation X, it is used for dividing the relation X vertically in columns and it involves creation of tables and columns. They also use some additional tables to store left out columns. We cannot partition the column without perform any modification of value of the column. It only relies on keeping the particular attributes of relation X.