day88

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BitShiftDivision

func BitShiftDivision(dividend, divisor int32) (int32, error)

BitShiftDivision calculates the division by bit-shifting. Runs in O(1) time because it loops over 63-bits and O(1) space. Returns an error if divisor is zero.

func BruteForceDivision

func BruteForceDivision(dividend, divisor int32) (int32, error)

BruteForceDivision calculates the division by looping subtraction. Runs in O(Quotient) time and O(1) space. Returns an error if divisor is zero.

func ErrDivideByZero

func ErrDivideByZero() error

ErrDivideByZero is the error returned if you attempt to divide by zero.

Types

This section is empty.

Jump to

Keyboard shortcuts

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