Saturday, December 5, 2020

Greedy Vs Dynamic Programming

 Have a look

What's a priority queue?

 'Ladies first' is an instance of 'min priority queue', where as a queue free from any such bias is a normal queue.

Difference between creating a heap and heapify

 Creating a Heap is inserting all the elements of a given array into an existing heap assuming the first element of the given array as the initial heap, where as Heapify is simply creating a CBT ( complete binary tree) with all the elements of the given array and then converting that CBT into a heap, by moving up from the last non-leaf node up to the root.

Why time complexity of Heapify is O(n)?

 Look at this first  then you may Have a look here also.

Harmonic progression this is needed to understand the above. 

Sacred Thought

5 May 2024 Hari Om Verse 50-51, chapter two:  In this chapter two Shree krishna explains a simple way of living. Free from desires and void ...