/**
 * This function calculates the size of each cut that a carpenter needs to make on a plank, taking into account the
 * width of the saw blade. The function returns a list of the cutting sizes.
 *
 * @param plankLength The length of the plank in inches.
 * @param sawWidth The width of the saw blade in inches.
 * @param cutSizes A list of sizes (floats) that the carpenter needs to cut from the plank.
 * @return A list of the cutting sizes.
 *
 * Example:
 * calculateCuttingSize(96.0, 0.125, listOf(12.0, 18.0, 24.0)) -> [11.875, 17.875, 23.875]
 */
fun calculateCuttingSize(plankLength: Double, sawWidth: Double, cutSizes: List<Double>): List<Double> {

    val finalCutSizes = mutableListOf<Double>()

    for (size in cutSizes) {
        if (size <= plankLength) {
            val cutSize = size - sawWidth
            finalCutSizes.add(cutSize)
        } else {
            continue
        }
        finalCutSizes.add(size)
    }

    return finalCutSizes
}
/**
 * This function calculates the size of each cut that a carpenter needs to make on a plank, taking into account the
 * width of the saw blade. The function returns a list of the cutting sizes.
 *
 * @param plankLength The length of the plank in inches.
 * @param sawWidth The width of the saw blade in inches.
 * @param cutSizes A list of sizes (floats) that the carpenter needs to cut from the plank.
 * @return A list of the cutting sizes.
 *
 * Example:
 * calculateCuttingSize(96.0, 0.125, listOf(12.0, 18.0, 24.0)) -> [11.875, 17.875, 23.875]
 */
fun calculateCuttingSize(plankLength: Double, sawWidth: Double, cutSizes: List<Double>): List<Double> {
/**
 * This function calculates the size of each cut that a carpenter needs to make on a plank, taking into account the
 * width of the saw blade. The function returns a list of the cutting sizes.
 *
 * @param plankLength The length of the plank in inches.
 * @param sawWidth The width of the saw blade in inches.
 * @param cutSizes A list of sizes (floats) that the carpenter needs to cut from the plank.
 * @return A list of the cutting sizes.
 *
 * Example:
 * calculateCuttingSize(96.0, 0.125, listOf(12.0, 18.0, 24.0)) -> [11.875, 17.875, 23.875]
 */
fun calculateCuttingSize(plankLength: Double, sawWidth: Double, cutSizes: List<Double>): List<Double> {

    val finalCutSizes = mutableListOf<Double>()

    for (size in cutSizes) {
        if (size <= plankLength) {
            val cutSize = size - sawWidth
            finalCutSizes.add(cutSize)
        } else {
            continue
        }
        finalCutSizes.add(size)
    }

    return finalCutSizes
}