Solutions to these problems
Note that there are other ways to solve these problems, different algorithms to achieve the same goals, which may have different algorithmic complexities.
Write a program that determines if an input is even or odd. Explain its average and worst run time
function is_odd(n) {
return (n % 2) != 0;
}