This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
water_arr = [4, 2, 0, 3, 2, 5] | |
def water_area(water_arr): | |
left_max = [] | |
right_max = [] | |
wa_idx_left = 0 | |
wa_idx_right = len(water_arr) | |
while wa_idx_left < len(water_arr) and wa_idx_right >= 0: | |
highest_left = max(water_arr[:wa_idx_left]) if water_arr[:wa_idx_left] else 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Definir color al principio del documento | |
\definecolor{Micolor1}{RGB}{134,219,255} | |
\begin{table}[h!] | |
\centering | |
\begin{tabular}{*5l} | |
\hline | |
\toprule | |
\rowcolor{Micolor1} \textbf{Métrica} & \textbf{Valor} \\ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class LengthStrategy { | |
constructor(configField){ | |
this.minLength = configField['minLength']; | |
this.maxLength = configField['maxLength']; | |
} | |
execute(value){ | |
if (value.length < this.minLength){ | |
return `Error, la longitud mínima debe ser ${this.minLength}`; |