954,483 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Binomial Heap in Big-O(1)

I have a final coming up and the professor has hinted in class that there would be a question on how to make the primitive min operation in Big-O(1). I know that its capable of and how it works in Big-O(log n). I have idea that it will involve the use of pointers. The exam is Tuesday.

eagles39
Newbie Poster
15 posts since Nov 2010
Reputation Points: 10
Solved Threads: 0
 

Its very obvious that IN MIN HEAP , the smallest element will sit at the top of the tree ,hence to search the smallest element in the heap , it takes constant time i.e O(1)

srinath1
Newbie Poster
11 posts since Jan 2012
Reputation Points: 10
Solved Threads: 0
 

Or just store a copy of the min element alongside whatever data structure you want and you can then access it in O(1) time.

Rashakil Fol
Super Senior Demiposter
Team Colleague
2,658 posts since Jun 2005
Reputation Points: 1,135
Solved Threads: 177
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You