master > master: code - minor
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user