Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClosestLargerNumberIndexBrute ¶
ClosestLargerNumberIndexBrute looks for the closest number larger than the target and returns the index of that number. If no number if found, then -1 is returned. Runs in O(N) time.
func PreprocessClosestLargerNumberIndex ¶
PreprocessClosestLargerNumberIndex pre-processes the input and returns a new slice that can answer the question for any index in O(1). This pre-processing takes O(N^2) time.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.