day235

package
v0.0.0-...-36687a4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2020 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MaxMinNotGoodEnough

func MaxMinNotGoodEnough(nums []int) (min, max int)

MaxMinNotGoodEnough returns the minimum and maximum values from the slice of integers. Runs in 2*(N-1) because it does N-1 comparisons for both min and max.

func MaxMinPairs

func MaxMinPairs(nums []int) (min, max int)

MaxMinPairs returns the minimum and maximum values from the slice of integers. Runs in 3N/2 which is smaller than 2*(N-2)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL