master > master: code go - fügte algorithmus hinzu

This commit is contained in:
RD
2021-11-05 15:43:53 +01:00
parent 1fd932c0ef
commit 38025247c7
5 changed files with 242 additions and 1 deletions

View File

@@ -17,6 +17,7 @@ import (
algorithm_search_jump "ads/internal/algorithms/search/jump"
algorithm_search_poison "ads/internal/algorithms/search/poison"
algorithm_search_sequential "ads/internal/algorithms/search/sequential"
algorithm_stacks_next_greater_element "ads/internal/algorithms/stacks/next_greater_element"
algorithm_sum_maxsubsum "ads/internal/algorithms/sum/maxsubsum"
)
@@ -138,6 +139,13 @@ func RunNonInteractive(path string) error {
} else {
err_case = fmt.Errorf("Fehlende Inputs für Befehl '%[1]s'.", *problem.Command)
}
case "algorithm-stacks-next-greater-element":
L := inputs.List
if L != nil {
_, err_case = algorithm_stacks_next_greater_element.FancyNextGreaterElement(*L)
} else {
err_case = fmt.Errorf("Fehlende Inputs für Befehl '%[1]s'.", *problem.Command)
}
case "algorithm-sum-maxsub":
L := inputs.List
if L != nil {