/**
 * This function counts the number of animal species within a given range of indices in the animal dictionary.
 *
 * @param animalDict A dictionary containing animal names as keys and their corresponding species as values.
 * @param start The starting index of the range to consider (inclusive).
 * @param stop The ending index of the range to consider (exclusive).
 * @return The count of unique animal species within the given range.
 *
 * Example:
 * val animalDict = mapOf("Lion" to "Panthera leo", "Tiger" to "Panthera tigris", "Leopard" to "Panthera pardus",
 *                        "Cheetah" to "Acinonyx jubatus", "Jaguar" to "Panthera onca", "Snow Leopard" to "Panthera uncia")
 * countAnimalSpecies(animalDict, 1, 4) // Output: 2
 */
fun countAnimalSpecies(animalDict: Map<String, String>, start: Int, stop: Int): Int {

    val uniqueSpecies = animalDict.values.toSet()
    val selectedSpecies = uniqueSpecies.toList().subList(start, stop)
    return selectedSpecies.size
}
/**
 * This function counts the number of animal species within a given range of indices in the animal dictionary.
 *
 * @param animalDict A dictionary containing animal names as keys and their corresponding species as values.
 * @param start The starting index of the range to consider (inclusive).
 * @param stop The ending index of the range to consider (exclusive).
 * @return The count of unique animal species within the given range.
 *
 * Example:
 * val animalDict = mapOf("Lion" to "Panthera leo", "Tiger" to "Panthera tigris", "Leopard" to "Panthera pardus",
 *                        "Cheetah" to "Acinonyx jubatus", "Jaguar" to "Panthera onca", "Snow Leopard" to "Panthera uncia")
 * countAnimalSpecies(animalDict, 1, 4) // Output: 2
 */
fun countAnimalSpecies(animalDict: Map<String, String>, start: Int, stop: Int): Int {
/**
 * This function counts the number of animal species within a given range of indices in the animal dictionary.
 *
 * @param animalDict A dictionary containing animal names as keys and their corresponding species as values.
 * @param start The starting index of the range to consider (inclusive).
 * @param stop The ending index of the range to consider (exclusive).
 * @return The count of unique animal species within the given range.
 *
 * Example:
 * val animalDict = mapOf("Lion" to "Panthera leo", "Tiger" to "Panthera tigris", "Leopard" to "Panthera pardus",
 *                        "Cheetah" to "Acinonyx jubatus", "Jaguar" to "Panthera onca", "Snow Leopard" to "Panthera uncia")
 * countAnimalSpecies(animalDict, 1, 4) // Output: 2
 */
fun countAnimalSpecies(animalDict: Map<String, String>, start: Int, stop: Int): Int {

    val uniqueSpecies = animalDict.values.toSet()
    val selectedSpecies = uniqueSpecies.toList().subList(start, stop)
    return selectedSpecies.size
}