/**
 * Given a list of colors and a specific color, the function should return the number of times the color repeats consecutively in the list.
 */
fun findRepeatColors(colors: List<String>, color: String): Int {

    var repeatCount = 0
    var currentCount = 0

    for (c in colors) {
        currentCount = (currentCount shl 1) or (if (c == color) 1 else 0)
        repeatCount += if (currentCount == 3) 1 else 0
    }

    return repeatCount
}

// Example usage
/**
 * Given a list of colors and a specific color, the function should return the number of times the color repeats consecutively in the list.
 */
fun findRepeatColors(colors: List<String>, color: String): Int {
/**
 * Given a list of colors and a specific color, the function should return the number of times the color repeats consecutively in the list.
 */
fun findRepeatColors(colors: List<String>, color: String): Int {

    var repeatCount = 0
    var currentCount = 0

    for (c in colors) {
        currentCount = (currentCount shl 1) or (if (c == color) 1 else 0)
        repeatCount += if (currentCount == 3) 1 else 0
    }

    return repeatCount
}

// Example usage