/**
 * Given a list of coordinate tuples, modify the coordinates by adding 1 to all the x-coordinates and subtracting 1
 * from all the y-coordinates.
 *
 * @param coordinates A list of coordinate tuples, where each tuple represents (x, y) coordinates.
 * @return A new list of modified coordinate tuples.
 *
 * Example:
 * modifyCoordinates(listOf(4 to 2, 6 to 5, 2 to 7))
 * Expected output: [(5, 1), (7, 4), (3, 6)]
 */
fun modifyCoordinates(coordinates: List<Pair<Int, Int>>): List<Pair<Int, Int>> {

    val modifiedCoordinates = mutableListOf<Pair<Int, Int>>()

    // Iterate over the coordinate tuples
    for ((x, y) in coordinates) {
        // Modify the coordinates
        val modifiedX = x + 1
        val modifiedY = y - 1

        // Add the modified coordinate tuple to the new list
        modifiedCoordinates.add(modifiedX to modifiedY)
    }

    return modifiedCoordinates
}
/**
 * Given a list of coordinate tuples, modify the coordinates by adding 1 to all the x-coordinates and subtracting 1
 * from all the y-coordinates.
 *
 * @param coordinates A list of coordinate tuples, where each tuple represents (x, y) coordinates.
 * @return A new list of modified coordinate tuples.
 *
 * Example:
 * modifyCoordinates(listOf(4 to 2, 6 to 5, 2 to 7))
 * Expected output: [(5, 1), (7, 4), (3, 6)]
 */
fun modifyCoordinates(coordinates: List<Pair<Int, Int>>): List<Pair<Int, Int>> {
/**
 * Given a list of coordinate tuples, modify the coordinates by adding 1 to all the x-coordinates and subtracting 1
 * from all the y-coordinates.
 *
 * @param coordinates A list of coordinate tuples, where each tuple represents (x, y) coordinates.
 * @return A new list of modified coordinate tuples.
 *
 * Example:
 * modifyCoordinates(listOf(4 to 2, 6 to 5, 2 to 7))
 * Expected output: [(5, 1), (7, 4), (3, 6)]
 */
fun modifyCoordinates(coordinates: List<Pair<Int, Int>>): List<Pair<Int, Int>> {

    val modifiedCoordinates = mutableListOf<Pair<Int, Int>>()

    // Iterate over the coordinate tuples
    for ((x, y) in coordinates) {
        // Modify the coordinates
        val modifiedX = x + 1
        val modifiedY = y - 1

        // Add the modified coordinate tuple to the new list
        modifiedCoordinates.add(modifiedX to modifiedY)
    }

    return modifiedCoordinates
}