mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-02-17 14:58:10 +00:00
Added more details about the problem statement (#1367)
* Update DIRECTORY * Updated DIRECTORY * Fixed bug in directory build and re-build the directory.md * fixed url issue * fixed indentation in Directory.md * Add problem-18 of project-euler * Delete sol1.py * Delete files * Added more details to question * Added doctest in printNGE() * Made changes to fix Travis CI build * Remove the trailing whitespace
This commit is contained in:
parent
a7f3851939
commit
5ef5f67a51
|
@ -1,6 +1,13 @@
|
|||
# Function to print element and NGE pair for all elements of list
|
||||
def printNGE(arr):
|
||||
|
||||
"""
|
||||
Function to print element and Next Greatest Element (NGE) pair for all elements of list
|
||||
NGE - Maximum element present afterwards the current one which is also greater than current one
|
||||
>>> printNGE([11,13,21,3])
|
||||
11 -- 13
|
||||
13 -- 21
|
||||
21 -- -1
|
||||
3 -- -1
|
||||
"""
|
||||
for i in range(0, len(arr), 1):
|
||||
|
||||
next = -1
|
||||
|
|
Loading…
Reference in New Issue
Block a user