Answer:
Explanation:
We start from the bottom-most and rightmost internal node of min Heap and then heapify all internal modes in the bottom-up way to build the Max heap.
To build a heap, the following algorithm is implemented for any input array.
BUILD-HEAP(A)
heapsize := size(A)
for i := floor(heapsize/2) downto 1
do HEAPIFY(A, i)
end for
Convert the given array of elements into an almost complete binary tree.
Ensure that the tree is a max heap.
Check that every non-leaf node contains a greater or equal value element than its child nodes.
If there exists any node that does not satisfy the ordering property of max heap, swap the elements.
Start checking from a non-leaf node with the highest index (bottom to top and right to left).
Answer:
Electronic Data Interchange (EDI)
Explanation:
Electronic Data Interchange
It is the automated interchange of commercial information using a structured format. A process that allows a company to send information to another company electronically rather than on paper. Commercial entities that conduct business electronically are called business partners.
Numerous commercial documents can be exchanged using electronic data interchange, but the two most common are purchase orders and invoices. At a bottom, EDI interchanges the preparation and handling of mail associated with traditional commercial communication. However, the true power of EDI is that it standardizes the information communicated in commercial documents, which makes a "paperless" exchange possible.
Answer:
li=list(map(str,input().strip().split()))#taking input of the string.
#swapping first and last element.
temp=li[0]
li[0]=li[-1]
li[-1]=temp
print(li)#printing the list.
Explanation:
I have taken the list li for taking the input of strings.Then after that swapping first and last element of the list.Then printing the list.