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
0
Newbie Poster
Recommended Answers
Jump to PostOr just store a copy of the min element alongside whatever data structure you want and you can then access it in O(1) time.
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.