From 18ece75b6792beda7b069bf177b3d085bf082893 Mon Sep 17 00:00:00 2001 From: RLogik Date: Mon, 8 Nov 2021 13:21:03 +0100 Subject: [PATCH] master > master: code - minor --- .../stacks/next_greater_element/next_greater_element.go | 4 ++-- code/golang/pkg/data_structures/queues/queues.go | 2 +- code/python/src/algorithms/stacks/next_greater_element.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/code/golang/pkg/algorithms/stacks/next_greater_element/next_greater_element.go b/code/golang/pkg/algorithms/stacks/next_greater_element/next_greater_element.go index b07ef4d..670fbf3 100644 --- a/code/golang/pkg/algorithms/stacks/next_greater_element/next_greater_element.go +++ b/code/golang/pkg/algorithms/stacks/next_greater_element/next_greater_element.go @@ -21,7 +21,7 @@ import ( * ---------------------------------------------------------------- */ /* -Inputs: L = Liste von Zahlen, x = Zahl. +Inputs: L = Liste von Zahlen. Outputs: Liste von Paaren von Elementen und ihrem nächsten größeren Element */ @@ -42,7 +42,7 @@ func NextGreaterElement(L []int) [][2]int { element := S.TOP() if element < nextElement { // falls top Element < next Element, zum Output hinzufügen und vom Stack entfernen - logging.Debug("Stack S | %v; top Element > nextElement; ==> pop und Paar zum Output hinzufügen", S) + logging.Debug("Stack S | %v; top Element < nextElement; ==> pop und Paar zum Output hinzufügen", S) output = append(output, [2]int{element, nextElement}) S.POP() metrics.AddMovesCost() diff --git a/code/golang/pkg/data_structures/queues/queues.go b/code/golang/pkg/data_structures/queues/queues.go index e858c95..a97dd7c 100644 --- a/code/golang/pkg/data_structures/queues/queues.go +++ b/code/golang/pkg/data_structures/queues/queues.go @@ -24,7 +24,7 @@ type QueueInt struct { } /* ---------------------------------------------------------------- * - * METHODS stacks + * METHODS queues * ---------------------------------------------------------------- */ func CREATE() QueueInt { diff --git a/code/python/src/algorithms/stacks/next_greater_element.py b/code/python/src/algorithms/stacks/next_greater_element.py index d164b05..0424b2b 100644 --- a/code/python/src/algorithms/stacks/next_greater_element.py +++ b/code/python/src/algorithms/stacks/next_greater_element.py @@ -37,7 +37,7 @@ def postChecks(L: List[int], **_): @algorithmInfos(name='NextGreaterElement (with stacks)', outputnames=['pairs'], preChecks=preChecks, postChecks=postChecks) def NextGreaterElement(L: List[int]) -> List[Tuple[int,int]]: ''' - Inputs: L = Liste von Zahlen, x = Zahl. + Inputs: L = Liste von Zahlen. Outputs: Liste von Paaren von Elementen und ihrem nächsten größeren Element ''' output = []; @@ -57,7 +57,7 @@ def NextGreaterElement(L: List[int]) -> List[Tuple[int,int]]: element = S.TOP(); # falls element < next Element, zum Output hinzufügen und vom Stack entfernen if element < nextElement: - logDebug('Stack S | {S}; top Element > nextElement; ==> pop und Paar zum Output hinzufügen'.format(S=S)) + logDebug('Stack S | {S}; top Element < nextElement; ==> pop und Paar zum Output hinzufügen'.format(S=S)) output.append((element, nextElement)); S.POP(); AddMovesCost();