/**
 * Write a function that takes in two lists: availableItems and wishList.
 * This function should return a list containing the items that are both available and on the wish list.
 *
 * @param availableItems A list of available decor items.
 * @param wishList A list of desired decor items.
 * @return A list of common items between availableItems and wishList.
 *
 * Example:
 * findCommonItems(listOf("chair", "table", "lamp", "rug"), listOf("chair", "mirror", "rug"))
 * Output: ["chair", "rug"]
 */
fun findCommonItems(availableItems: List<String>, wishList: List<String>): List<String> {

    val commonItems = mutableListOf<String>()

    for (item in wishList) {
        if (item in availableItems) {
            commonItems.add(item)
        }
    }

    return commonItems
}
/**
 * Write a function that takes in two lists: availableItems and wishList.
 * This function should return a list containing the items that are both available and on the wish list.
 *
 * @param availableItems A list of available decor items.
 * @param wishList A list of desired decor items.
 * @return A list of common items between availableItems and wishList.
 *
 * Example:
 * findCommonItems(listOf("chair", "table", "lamp", "rug"), listOf("chair", "mirror", "rug"))
 * Output: ["chair", "rug"]
 */
fun findCommonItems(availableItems: List<String>, wishList: List<String>): List<String> {
/**
 * Write a function that takes in two lists: availableItems and wishList.
 * This function should return a list containing the items that are both available and on the wish list.
 *
 * @param availableItems A list of available decor items.
 * @param wishList A list of desired decor items.
 * @return A list of common items between availableItems and wishList.
 *
 * Example:
 * findCommonItems(listOf("chair", "table", "lamp", "rug"), listOf("chair", "mirror", "rug"))
 * Output: ["chair", "rug"]
 */
fun findCommonItems(availableItems: List<String>, wishList: List<String>): List<String> {

    val commonItems = mutableListOf<String>()

    for (item in wishList) {
        if (item in availableItems) {
            commonItems.add(item)
        }
    }

    return commonItems
}