/**
 * This function takes in a list of animals and an index, and returns a list of animals that are not equal to the animal at the given index.
 *
 * @param animals A list of animals.
 * @param index The index of the animal to compare with.
 * @return A list of animals that are not equal to the animal at the given index.
 *
 * Example:
 * animals = listOf("dog", "cat", "dog", "rabbit", "dog")
 * findNotEqualAnimals(animals, 2) // Output: ["cat", "rabbit"]
 */
fun findNotEqualAnimals(animals: List<String>, index: Int): List<String> {

    val notEqualAnimals = mutableListOf<String>()
    for (i in animals.indices) {
        if (i != index && animals[i] != animals[index]) {
            notEqualAnimals.add(animals[i])
        }
    }
    return notEqualAnimals
}
/**
 * This function takes in a list of animals and an index, and returns a list of animals that are not equal to the animal at the given index.
 *
 * @param animals A list of animals.
 * @param index The index of the animal to compare with.
 * @return A list of animals that are not equal to the animal at the given index.
 *
 * Example:
 * animals = listOf("dog", "cat", "dog", "rabbit", "dog")
 * findNotEqualAnimals(animals, 2) // Output: ["cat", "rabbit"]
 */
fun findNotEqualAnimals(animals: List<String>, index: Int): List<String> {
/**
 * This function takes in a list of animals and an index, and returns a list of animals that are not equal to the animal at the given index.
 *
 * @param animals A list of animals.
 * @param index The index of the animal to compare with.
 * @return A list of animals that are not equal to the animal at the given index.
 *
 * Example:
 * animals = listOf("dog", "cat", "dog", "rabbit", "dog")
 * findNotEqualAnimals(animals, 2) // Output: ["cat", "rabbit"]
 */
fun findNotEqualAnimals(animals: List<String>, index: Int): List<String> {

    val notEqualAnimals = mutableListOf<String>()
    for (i in animals.indices) {
        if (i != index && animals[i] != animals[index]) {
            notEqualAnimals.add(animals[i])
        }
    }
    return notEqualAnimals
}