/**
 * Create a building based on the provided blueprint and materials.
 *
 * @param blueprint The blueprint for the building.
 * @param materials The list of materials available.
 * @return The completed building if all required materials are available, "Insufficient materials" otherwise.
 */
fun createBuilding(blueprint: String, materials: List<String>): String {

    val requiredMaterials = blueprint.toSet()
    val availableMaterials = materials.toSet()

    return if (requiredMaterials.isSubset(availableMaterials)) {
        "Building created successfully!"
    } else {
        "Insufficient materials"
    }
}

fun Set<*>.isSubset(other: Set<*>): Boolean {
    return other.containsAll(this)
}
/**
 * Create a building based on the provided blueprint and materials.
 *
 * @param blueprint The blueprint for the building.
 * @param materials The list of materials available.
 * @return The completed building if all required materials are available, "Insufficient materials" otherwise.
 */
fun createBuilding(blueprint: String, materials: List<String>): String {
/**
 * Create a building based on the provided blueprint and materials.
 *
 * @param blueprint The blueprint for the building.
 * @param materials The list of materials available.
 * @return The completed building if all required materials are available, "Insufficient materials" otherwise.
 */
fun createBuilding(blueprint: String, materials: List<String>): String {

    val requiredMaterials = blueprint.toSet()
    val availableMaterials = materials.toSet()

    return if (requiredMaterials.isSubset(availableMaterials)) {
        "Building created successfully!"
    } else {
        "Insufficient materials"
    }
}

fun Set<*>.isSubset(other: Set<*>): Boolean {
    return other.containsAll(this)
}