MCPcopy Create free account
hub / github.com/VanjaRo/LeetCode / main

Function main

tasks/658.go:7–10  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5)
6
7func main() {
8 arr := []int{1, 2, 3, 4}
9 fmt.Println(findClosestElements(arr, 2, 2))
10}
11
12func findClosestElements(arr []int, k int, x int) []int {
13 left, right := 0, len(arr)-k

Callers

nothing calls this directly

Calls 1

findClosestElementsFunction · 0.85

Tested by

no test coverage detected