day150

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: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Point

type Point struct {
	X, Y int
}

Point has an X and Y coordinate.

func KNearestPoints

func KNearestPoints(pts []Point, center Point, k int) []Point

KNearestPoints returns the k-nearest points closest to a center point. Runs in O(N log K) time.

Jump to

Keyboard shortcuts

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