common

package
v0.0.0-...-f12746e Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArrayToNum

func ArrayToNum(nums []int) int64

func DivideV1

func DivideV1(a int, b int) (int, int)

func Divisor

func Divisor(n int) []int

func DivisorV2

func DivisorV2(n int) int

func DivisorV3

func DivisorV3(s int) []int

func Fib

func Fib(n int64) int64

func FibBigInt

func FibBigInt(n *big.Int) *big.Int

func FloatCompare

func FloatCompare(a, b float64) int

func FloatEqualTo

func FloatEqualTo(a, b float64) bool

func GoldenFib

func GoldenFib(n int64) float64

func GoldenFibBig

func GoldenFibBig(n *big.Int) *big.Float

func Multiple

func Multiple(a []int, b []int, r []int)

func MultipleWithResult

func MultipleWithResult(f []int, g []int) []int

func NextPermutationV1

func NextPermutationV1(c []int, l int, r int)

func NextPermutationV2

func NextPermutationV2(c []int, l int, r int) bool

func NextPermutationV3

func NextPermutationV3(c []int, first int, last int) bool

https://github.com/cweill/Permute-Golang/blob/master/permute.go http://wordaligned.org/articles/next-permutation Ddsger W. Dijkstra A DISCIPLINE OF PROGRAMMING, Chapter 13

func NumToArray

func NumToArray(num int) []int

func NumbericLength

func NumbericLength(n []int) int

used for numberic arrays

func Plus

func Plus(a []int, b []int, r []int)

func PlusV2

func PlusV2(a []int, b []int, r []int)

func Prime

func Prime(n int) bool

func QuickDivision

func QuickDivision(a int, b int) (int, int)

func Quo

func Quo(a []int, b []int, r []int)

func Reverse

func Reverse(c []int, first int, last int)

Reverse() is a predefined function in header file algorithm. It is defined as a template in the above mentioned header file. It reverses the order of the elements in the range [first, last) of any container. Note: The range used is [first,last), which contains all the elements between first and last, including the element pointed by first but not the element pointed by last. https://github.com/gcc-mirror/gcc/blob/gcc-9-branch/libstdc++-v3/include/bits/stl_algo.h#L1150-L1164

func ReverseV2

func ReverseV2(c []int, l int, r int)

func TailFib

func TailFib(n int64, a int64, b int64) int64

func TailFibArray

func TailFibArray(n []int, a []int, b []int) (r []int)

Types

This section is empty.

Jump to

Keyboard shortcuts

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