dynamic

package
v0.0.2-alpha Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package dynamic is a package of certain implementations of dynamically run algorithms.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bin2

func Bin2(n int, k int) int

Bin2 function

func CutRodDp

func CutRodDp(price []int, length int) int

CutRodDp solve the same problem using dynamic programming

func CutRodRec

func CutRodRec(price []int, length int) int

CutRodRec solve the problem recursively: initial approach

func LongestCommonSubsequence

func LongestCommonSubsequence(a string, b string, m int, n int) int

LongestCommonSubsequence function

func LpsDp

func LpsDp(word string) int

LpsDp function

func LpsRec

func LpsRec(word string, i, j int) int

LpsRec function

func MatrixChainDp

func MatrixChainDp(D []int) int

MatrixChainDp function

func MatrixChainRec

func MatrixChainRec(D []int, i, j int) int

MatrixChainRec function

func Max

func Max(a, b int) int

Max function - possible duplicate

func Min

func Min(a, b int) int

Min function - possible duplicate

func NthFibonacci

func NthFibonacci(n uint) uint

NthFibonacci returns the nth Fibonacci Number

func Solve

func Solve(maxWeight int, weights, values []int) int

Solve knapsack problem return maxProfit

Types

This section is empty.

Jump to

Keyboard shortcuts

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