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.
Answer:
An algorithm is a specific procedure for solving a well-defined computational problem. ... It requires an understanding of the alternatives available for solving a computational problem, including the hardware, networking, programming language, and performance constraints that accompany any particular solution.
Answer:
Cheating and misunderstanding
Explanation:
The baseline of the love is based on the compatibility and understanding means how much the two partners understand each other and how they support each other. If the understanding is not up to the mark then it will be the major cause of breakup.
The second thing in the love is loyalty, it is most important factor in any relation, if any partner is not loyal towards other then there will be more chances to end up the relationship.