/**
 * You are an interior designer and want to determine the largest area among all the rooms in a client's house.
 * You are given a list 'rooms' which contains the dimensions of each room in the house. The dimensions are given in the
 * form of tuples representing the room's length and width.
 *
 * Your task is to find the maximum area among all the rooms and return it.
 *
 * Example:
 * rooms = [(4, 5), (3, 7), (8, 2), (6, 9)]
 * The maximum area is 54, which corresponds to the room with dimensions (6, 9).
 *
 * Hint: You can use a for loop to iterate through the list of rooms and calculate the area of each room using the formula:
 * area = length * width
 * Keep track of the maximum area found so far using a variable.
 */
fun findMaxArea(rooms: List<Pair<Int, Int>>): Int {

    var maxArea = 0

    for (room in rooms) {
        val area = room.first * room.second
        if (area > maxArea) {
            maxArea = area
        }
    }

    return maxArea
}
/**
 * You are an interior designer and want to determine the largest area among all the rooms in a client's house.
 * You are given a list 'rooms' which contains the dimensions of each room in the house. The dimensions are given in the
 * form of tuples representing the room's length and width.
 *
 * Your task is to find the maximum area among all the rooms and return it.
 *
 * Example:
 * rooms = [(4, 5), (3, 7), (8, 2), (6, 9)]
 * The maximum area is 54, which corresponds to the room with dimensions (6, 9).
 *
 * Hint: You can use a for loop to iterate through the list of rooms and calculate the area of each room using the formula:
 * area = length * width
 * Keep track of the maximum area found so far using a variable.
 */
fun findMaxArea(rooms: List<Pair<Int, Int>>): Int {
/**
 * You are an interior designer and want to determine the largest area among all the rooms in a client's house.
 * You are given a list 'rooms' which contains the dimensions of each room in the house. The dimensions are given in the
 * form of tuples representing the room's length and width.
 *
 * Your task is to find the maximum area among all the rooms and return it.
 *
 * Example:
 * rooms = [(4, 5), (3, 7), (8, 2), (6, 9)]
 * The maximum area is 54, which corresponds to the room with dimensions (6, 9).
 *
 * Hint: You can use a for loop to iterate through the list of rooms and calculate the area of each room using the formula:
 * area = length * width
 * Keep track of the maximum area found so far using a variable.
 */
fun findMaxArea(rooms: List<Pair<Int, Int>>): Int {

    var maxArea = 0

    for (room in rooms) {
        val area = room.first * room.second
        if (area > maxArea) {
            maxArea = area
        }
    }

    return maxArea
}