Skip to content

eladgl/TwoHeapsDataStructure

Repository files navigation

/*
* A Code Made By Elad Goldenberg
*This is a data structure for the following constraints:
*___________________________________________________________
*|Func Name    |    Details                                 |
*|----------------------------------------------------------|
*|Init(S)      |For a Given array A with len(A)=m,          |
*|             |initialize the structure at O(m).           |
*|----------------------------------------------------------|
*|Insert(x)    |Adding x to the data structure at O(log(n)) |
*|             |as n is the current number of elements      |
*|----------------------------------------------------------|
*|Find-Min     |Return minimum at O(1)                      |
*|----------------------------------------------------------|
*|Find-Max     |Returen maximum at O(1)                     |
*|----------------------------------------------------------|
*|Del-Min      |Deleting minimum from structure at O(log(n))|
*|----------------------------------------------------------|
*|Del-Max      |Deleting maxmimum from structur at O(log(n))|
*------------------------------------------------------------
*All the above are time complexity requirements
*/

About

This is an implementation of two heaps data structure, one min and the other max to hold contraints about time complexity given in the readme file

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages