toggle menu
KAHelpers
androidJvm
switch theme
search in API
dataStructuresAndAlgorithms
/
dev.funkymuse.datastructuresandalgorithms.heap
/
AbstractHeap
Abstract
Heap
abstract
class
AbstractHeap
<
T
>
:
Heap
<
T
>
Inheritors
ComparableHeap
ComparatorHeap
Members
Constructors
Abstract
Heap
Link copied to clipboard
constructor
(
)
Properties
count
Link copied to clipboard
open
override
val
count
:
Int
elements
Link copied to clipboard
var
elements
:
ArrayList
<
T
>
is
Empty
Link copied to clipboard
open
val
isEmpty
:
Boolean
is
Not
Empty
Link copied to clipboard
open
val
isNotEmpty
:
Boolean
Functions
compare
Link copied to clipboard
abstract
fun
compare
(
first
:
T
,
second
:
T
)
:
Int
get
Nth
Smallest
T
Link copied to clipboard
open
override
fun
getNthSmallestT
(
n
:
T
)
:
T
?
insert
Link copied to clipboard
open
override
fun
insert
(
element
:
T
)
is
Min
Heap
Link copied to clipboard
open
override
fun
isMinHeap
(
)
:
Boolean
merge
Link copied to clipboard
open
override
fun
merge
(
heap
:
AbstractHeap
<
T
>
)
peek
Link copied to clipboard
open
override
fun
peek
(
)
:
T
?
remove
Link copied to clipboard
open
override
fun
remove
(
)
:
T
?
remove
At
Link copied to clipboard
open
override
fun
removeAt
(
index
:
Int
)
:
T
?