Red Hat Interview Question

- Do a function in X language with algorithm, describe complexity