@@ -13,10 +13,10 @@ def next_greatest_element_slow(arr: list[float]) -> list[float]:
13
13
of O(n^2), where n is the size of the array.
14
14
15
15
Args:
16
- arr (list[float]) : List of numbers for which the NGE is calculated.
16
+ arr: List of numbers for which the NGE is calculated.
17
17
18
18
Returns:
19
- list[float]: List containing the next greatest elements. If no
19
+ List containing the next greatest elements. If no
20
20
greater element is found, -1 is placed in the result.
21
21
22
22
Example:
@@ -47,10 +47,10 @@ def next_greatest_element_fast(arr: list[float]) -> list[float]:
47
47
it still has a time complexity of O(n^2).
48
48
49
49
Args:
50
- arr (list[float]) : List of numbers for which the NGE is calculated.
50
+ arr: List of numbers for which the NGE is calculated.
51
51
52
52
Returns:
53
- list[float]: List containing the next greatest elements. If no
53
+ List containing the next greatest elements. If no
54
54
greater element is found, -1 is placed in the result.
55
55
56
56
Example:
@@ -80,10 +80,10 @@ def next_greatest_element(arr: list[float]) -> list[float]:
80
80
greatest element for each element.
81
81
82
82
Args:
83
- arr (list[float]) : List of numbers for which the NGE is calculated.
83
+ arr: List of numbers for which the NGE is calculated.
84
84
85
85
Returns:
86
- list[float]: List containing the next greatest elements. If no
86
+ List containing the next greatest elements. If no
87
87
greater element is found, -1 is placed in the result.
88
88
89
89
Example:
0 commit comments