/**
 * As a geologist, you have been given a list of minerals found in a sample and you need to find a specific mineral.
 *
 * Complete the code below to find the targetMineral in the given mineralList and exit the while loop once found.
 *
 * @param mineralList A list of minerals found in the sample.
 * @param targetMineral The mineral you are searching for.
 * @return The targetMineral if found; otherwise, returns "Target mineral not found".
 */
fun findingMineral(mineralList: List<String>, targetMineral: String): String {

    var i = 0
    while (i < mineralList.size) {
        if (mineralList[i] == targetMineral) {
            return targetMineral
        }
        i++
    }
    return "Target mineral not found"
}
/**
 * As a geologist, you have been given a list of minerals found in a sample and you need to find a specific mineral.
 *
 * Complete the code below to find the targetMineral in the given mineralList and exit the while loop once found.
 *
 * @param mineralList A list of minerals found in the sample.
 * @param targetMineral The mineral you are searching for.
 * @return The targetMineral if found; otherwise, returns "Target mineral not found".
 */
fun findingMineral(mineralList: List<String>, targetMineral: String): String {
/**
 * As a geologist, you have been given a list of minerals found in a sample and you need to find a specific mineral.
 *
 * Complete the code below to find the targetMineral in the given mineralList and exit the while loop once found.
 *
 * @param mineralList A list of minerals found in the sample.
 * @param targetMineral The mineral you are searching for.
 * @return The targetMineral if found; otherwise, returns "Target mineral not found".
 */
fun findingMineral(mineralList: List<String>, targetMineral: String): String {

    var i = 0
    while (i < mineralList.size) {
        if (mineralList[i] == targetMineral) {
            return targetMineral
        }
        i++
    }
    return "Target mineral not found"
}