/**
 * As a fashion designer, you want to create matching outfits based on given colors and patterns.
 * The function takes in two lists: colors and patterns, where each list contains the respective attributes
 * of different clothing items. Your task is to find all pairs of clothing items that have both matching
 * colors and patterns, and return them as a list of tuples.
 *
 * @param colors A list of strings representing the colors of clothing items
 * @param patterns A list of strings representing the patterns of clothing items
 * @return A list of tuples, where each tuple consists of two clothing items that have both matching colors and patterns.
 */
fun findMatchingOutfits(colors: List<String>, patterns: List<String>): List<Pair<String, String>> {

    val matchingOutfits = mutableListOf<Pair<String, String>>()
    var i = 0

    while (i < colors.size) {
        var j = 0

        while (j < patterns.size) {
            if (colors[i] == patterns[j]) {
                matchingOutfits.add(colors[i] to patterns[j])
                break
            }
            j++
        }

        i++
    }

    return matchingOutfits
}
/**
 * As a fashion designer, you want to create matching outfits based on given colors and patterns.
 * The function takes in two lists: colors and patterns, where each list contains the respective attributes
 * of different clothing items. Your task is to find all pairs of clothing items that have both matching
 * colors and patterns, and return them as a list of tuples.
 *
 * @param colors A list of strings representing the colors of clothing items
 * @param patterns A list of strings representing the patterns of clothing items
 * @return A list of tuples, where each tuple consists of two clothing items that have both matching colors and patterns.
 */
fun findMatchingOutfits(colors: List<String>, patterns: List<String>): List<Pair<String, String>> {
/**
 * As a fashion designer, you want to create matching outfits based on given colors and patterns.
 * The function takes in two lists: colors and patterns, where each list contains the respective attributes
 * of different clothing items. Your task is to find all pairs of clothing items that have both matching
 * colors and patterns, and return them as a list of tuples.
 *
 * @param colors A list of strings representing the colors of clothing items
 * @param patterns A list of strings representing the patterns of clothing items
 * @return A list of tuples, where each tuple consists of two clothing items that have both matching colors and patterns.
 */
fun findMatchingOutfits(colors: List<String>, patterns: List<String>): List<Pair<String, String>> {

    val matchingOutfits = mutableListOf<Pair<String, String>>()
    var i = 0

    while (i < colors.size) {
        var j = 0

        while (j < patterns.size) {
            if (colors[i] == patterns[j]) {
                matchingOutfits.add(colors[i] to patterns[j])
                break
            }
            j++
        }

        i++
    }

    return matchingOutfits
}