Skip to content

Instantly share code, notes, and snippets.

View jsparadacelis's full-sized avatar
👊
Keep fighting

Sebastián jsparadacelis

👊
Keep fighting
View GitHub Profile
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
% 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} \\
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}`;