


"""simple docstring"""



from __future__ import annotations

__snake_case         =					[-10, -5, 0, 5, 5.1, 11, 13, 21, 3, 4, -21, -10, -5, -1, 0]
__snake_case         =					[-5, 0, 5, 5.1, 11, 13, 21, -1, 4, -1, -10, -5, -1, 0, -1]







def 						__lowerCAmelCase		(		lowercase						:						list[float]				)			->		list[float]:


    """simple docstring"""





    snake_case					:   Tuple         =					[]
    snake_case					:   int         =					len(lowercase				)

    for i in range(lowercase				):
        snake_case					:   float         =					-1
        for j in range(i + 1		,							lowercase				):
            if arr[i] < arr[j]:
                snake_case					:   List[str]         =					arr[j]
                break
        result.append(lowercase				)
    return result







def 						__lowerCAmelCase		(		lowercase						:						list[float]				)			->		list[float]:


    """simple docstring"""





    snake_case					:   List[Any]         =					[]
    for i, outer in enumerate(lowercase				):
        snake_case					:   float         =					-1
        for inner in arr[i + 1 :]:
            if outer < inner:
                snake_case					:   Any         =					inner
                break
        result.append(lowercase				)
    return result







def 						__lowerCAmelCase		(		lowercase						:						list[float]				)			->		list[float]:


    """simple docstring"""





    snake_case					:   Optional[Any]         =					len(lowercase				)
    snake_case					:   list[float]         =					[]
    snake_case					:   list[float]         =					[-1] * arr_size

    for index in reversed(range(lowercase				)				):
        if stack:
            while stack[-1] <= arr[index]:
                stack.pop()
                if not stack:
                    break
        if stack:
            snake_case					:   str         =					stack[-1]
        stack.append(arr[index]				)
    return result


if __name__ == "__main__":
  from doctest import testmod
  from timeit import timeit

  testmod()
  print(next_greatest_element_slow(arr))
  print(next_greatest_element_fast(arr))
  print(next_greatest_element(arr))

  __snake_case         =					(
      """from __main__ import arr, next_greatest_element_slow, """
      """next_greatest_element_fast, next_greatest_element"""
  )
  print(
      """next_greatest_element_slow():""",
      timeit("""next_greatest_element_slow(arr)""", setup=setup),
  )
  print(
      """next_greatest_element_fast():""",
      timeit("""next_greatest_element_fast(arr)""", setup=setup),
  )
  print(
      """     next_greatest_element():""",
      timeit("""next_greatest_element(arr)""", setup=setup),
  )









"""simple docstring"""



# this script reports modified .py files under the desired list of top-level sub-dirs passed as a list of arguments, e.g.:
#   python ./utils/get_modified_files.py utils src tests examples
#
# it uses git to find the forking point and which files were modified - i.e. files not under git won't be considered
# since the output of this script is fed into Makefile commands it doesn't print a newline after the results

import re
import subprocess
import sys


__snake_case         =					subprocess.check_output("""git merge-base main HEAD""".split()).decode("""utf-8""")
__snake_case         =					(
    subprocess.check_output(F'''git diff --diff-filter=d --name-only {fork_point_sha}'''.split()).decode("""utf-8""").split()
)

__snake_case         =					"""|""".join(sys.argv[1:])
__snake_case         =					re.compile(RF'''^({joined_dirs}).*?\.py$''')

__snake_case         =					[x for x in modified_files if regex.match(x)]
print(""" """.join(relevant_modified_files), end="""""")





