Solución
solution.tsTypeScript
def array_mode(numbers: list[int]) -> list[int]:
# Escribe tu solución aquí
valores = {}
for num in numbers:
if num not in valores:
valores[num] = 1
else:
valores[num] += 1
final_list = []
mayor = max(valores.values())
for key,value in valores.items():
if value == mayor:
final_list.append(key)
final_list.sort()
return final_list0respuestas