master > master: minor
This commit is contained in:
parent
b193d1d61e
commit
3505401c7f
@ -41,8 +41,8 @@ func NextGreaterElement(L []int) [][2]int {
|
|||||||
for !S.EMPTY() { // ACHTUNG: schreibe 'while' im Pseudocode, denn dies ist eine while-Schleife in golang
|
for !S.EMPTY() { // ACHTUNG: schreibe 'while' im Pseudocode, denn dies ist eine while-Schleife in golang
|
||||||
element := S.TOP()
|
element := S.TOP()
|
||||||
if element < nextElement {
|
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)
|
||||||
// falls top Element < next Element, zum Output hinzufügen und vom Stack
|
|
||||||
addToOutput(element, nextElement)
|
addToOutput(element, nextElement)
|
||||||
S.POP()
|
S.POP()
|
||||||
metrics.AddMovesCost()
|
metrics.AddMovesCost()
|
||||||
|
@ -55,7 +55,7 @@ def NextGreaterElement(L: List[int]) -> List[Tuple[int,int]]:
|
|||||||
logDebug('Stack S | {S}'.format(S=S));
|
logDebug('Stack S | {S}'.format(S=S));
|
||||||
while not S.EMPTY():
|
while not S.EMPTY():
|
||||||
element = S.TOP();
|
element = S.TOP();
|
||||||
# falls element < next Element, zum Output hinzufügen
|
# falls element < next Element, zum Output hinzufügen und vom Stack entfernen
|
||||||
if element < nextElement:
|
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))
|
||||||
addToOutput(element, nextElement);
|
addToOutput(element, nextElement);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user