Create a data structure where inserting, deleting and finding the
minimum element all have O(1) time.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this
use a doubly linked list ... with a field node *min.
weneva you insert an element ... check for the value of min at the head ...
if the new inserted node has less value ... then set the min field to point
to itself else copy the min field of te previous head.
insertion and deletion is easy
c(n,2) * c(n,2)
On Wed, Jul 27, 2011 at 11:07 PM, siva viknesh sivavikne...@gmail.comwrote:
No. rectangles in NxN matrix
... is it n^2 + (n-2) ??
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
No. rectangles in NxN matrix
... is it n^2 + (n-2) ??
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to