toggle menu
KAHelpers
androidJvm
switch theme
search in API
dataStructuresAndAlgorithms
/
dev.funkymuse.datastructuresandalgorithms.problems
Package-level
declarations
Functions
Functions
find
Any
Pair
Produces
Sum
Binary
Search
Link copied to clipboard
fun
findAnyPairProducesSumBinarySearch
(
t
:
List
<
Int
>
,
sum
:
Int
)
:
Pair
<
Int
,
Int
>
O(n log n) worst time complexity
find
Any
Pair
Produces
Sum
Linear
Link copied to clipboard
fun
findAnyPairProducesSumLinear
(
t
:
List
<
Int
>
,
sum
:
Int
)
:
Pair
<
Int
,
Int
>
O(n) at worst
find
Any
Pair
Produces
Sum
Naive
Link copied to clipboard
fun
findAnyPairProducesSumNaive
(
t
:
List
<
Int
>
,
sum
:
Int
)
:
Pair
<
Int
,
Int
>
O(n^2) worst time complexity
generate
Words
Fixed
Length
Link copied to clipboard
fun
generateWordsFixedLength
(
length
:
Int
,
alphabet
:
List
<
Char
>
)
:
List
<
String
>
generate
Words
Upper
Bound
Length
Link copied to clipboard
fun
generateWordsUpperBoundLength
(
length
:
Int
,
alphabet
:
List
<
Char
>
)
:
List
<
String
>
Potentially unoptimised.
is
String
Balanced
Link copied to clipboard
fun
isStringBalanced
(
s
:
String
)
:
Boolean