Challenges

Challenge One

Having a list of n numbers with digits in range [0, 5], where n <= 100, switch all list positions in O(n) time. If the input number contains a digit greater or equal than 5, you will delete the digit from the number.

<

Resultados de Consola:

Challenge Two

Write a function that takes in a non-empty array of integers sorted in ascending order and returns a new array of the same length with the squares of the original integers also sorted in ascending order. If the output number is out of the range [0, 55] (for S=6 the range will be [0, 66]), you will delete it of the output array

<

Resultados de Consola:

Challenge Three

Given an array of positive integers representing the values of coins in your possession, write a function that returns the minimum amount of change (the minimum sum of money) that you CANNOT give change. The given coins can have any positive integer value and aren't necessarily unique (i.e., you can have multiple coins of the same value).

<

Resultados de Consola: