while deleting any node from binary heap instead of taking the element to root node then delete it cant we just swap that node with the lowest element and delete it then apply downheapify operation?
Binary trees deleting any node
The standard deletion operation on Heap is to delete the element present at the root node of the Heap. That is if it is a Max Heap, the standard deletion operation will delete the maximum element and if it is a Min heap, it will delete the minimum element. So you always have to delete using the root node.
Deleting an element at any intermediary position in the heap can be costly, so we can simply replace the element to be deleted by the last element and delete the last element of the Heap.Since, the last element is now placed at the position of the root node. So, it may not follow the heap property. Therefore, heapify the last node placed at the position of root. This is standard and the most efficient way to delete a node from a heap.
but if we have to delete intermediate element then why we need to go to the root node just swap it with last element and heapify it it would also reduce the time complexity
Unlike Binary Search tree, in Heaps you are not allowed to delete any node/element. You can only remove the minimum or the maximum element. In case of max heap, the root node is the maximum element. In case of min heap, root node is the minimum element.
Please watch the lecture video on Heap deletion again. It is explained well there.