Tuesday, December 13, 2011

Given an array-based heap on n elements and a real number x, efficiently determine whether the kth smallest element in the heap is greater than or equal to x. Your algorithm should be O(k) in the worst-case, independent of the size of the heap.

http://books.google.co.in/books?id=7XUSn0IKQEgC&lpg=PA116&ots=z77FSOIV0j&dq=Given+an+array-based+heap+on+n+elements+and+a+real+number+x,+efficiently+determine+whether+the+kth+smallest+element+in+the+heap+is+greater+than+or+equal+to+x.+Your+algorithm+should+be+O%28k%29+in+the+worst-case,+independent+of+the+size+of+the+heap.&pg=PA116&redir_esc=y#v=onepage&q=Given%20an%20array-based%20heap%20on%20n%20elements%20and%20a%20real%20number%20x%2C%20efficiently%20determine%20whether%20the%20kth%20smallest%20element%20in%20the%20heap%20is%20greater%20than%20or%20equal%20to%20x.%20Your%20algorithm%20should%20be%20O%28k%29%20in%20the%20worst-case%2C%20independent%20of%20the%20size%20of%20the%20heap.&f=false

No comments :