Documentation ¶
Index ¶
- func CountEval(input string, result bool) int
- func GenerateAllValidParens(count int) []string
- func GetPermutations(str string) (result []string)
- func GetPermutationsWithDuplicates(s string) []string
- func GetPowerSet(set []int) [][]int
- func MagicBinarySearch(array []int) (result int)
- func MagicFirstBruteForce(array []int) (i int)
- func MakeChange(n int) (result int)
- func MaxStackHeight(boxes []Box) int
- func NotIn(haystack []Point, needle Point) bool
- func PaintFill(screen [][]Color, r, c int, nColor Color) bool
- func PlaceNQueens(queens int) int
- func RecursiveMultiply(n, m int) int
- func SolveForN3()
- func TripleStep(n int) (result int)
- func TripleStepRecursive(n int) (result int)
- type Box
- type Color
- type Point
- type Tower
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CountEval ¶
CountEval the number of parenthesis required to evaluate a string. TODO: Fix algorithm
func GenerateAllValidParens ¶
GenerateAllValidParens generates all valid parenthesis having count.
func GetPermutations ¶
GetPermutations returns all permutations of a string
func GetPermutationsWithDuplicates ¶
GetPermutationsWithDuplicates returns all permutations of a string without duplicates.
func GetPowerSet ¶
func MagicBinarySearch ¶
func MagicFirstBruteForce ¶
func MakeChange ¶
MakeChange returns the amount of combinations of quaters, nikels, dimes and ones needed to make n
func MaxStackHeight ¶
MaxStackHeight calculates the maximum height that can be archived by stacking an array of boxes
func PlaceNQueens ¶
PlaceNQueens returns the number of ways of placing n queens in an n x n grid
func RecursiveMultiply ¶
func SolveForN3 ¶
func SolveForN3()
func TripleStep ¶
func TripleStepRecursive ¶
Types ¶
type Box ¶
type Box struct {
// contains filtered or unexported fields
}
Box is a box with height, width and depth dimensions
Source Files ¶
Click to show internal directories.
Click to hide internal directories.