/**
 * This exercise aims to find the number of similar records in a given list of records,
 * based on identity comparison, using a for loop.
 *
 * @param records A list of records (strings).
 * @param target The target record (string) for comparison.
 * @return The number of similar records (int) found in the list.
 *
 * Example:
 * findSimilarRecords(listOf("Record1", "Record2", "Record1", "Record3"), "Record1") -> 2 (two similar records)
 */
fun findSimilarRecords(records: List<String>, target: String): Int {

    var count = 0

    for (record in records) {
        if (record === target) {
            count++
        }
    }

    return count
}
/**
 * This exercise aims to find the number of similar records in a given list of records,
 * based on identity comparison, using a for loop.
 *
 * @param records A list of records (strings).
 * @param target The target record (string) for comparison.
 * @return The number of similar records (int) found in the list.
 *
 * Example:
 * findSimilarRecords(listOf("Record1", "Record2", "Record1", "Record3"), "Record1") -> 2 (two similar records)
 */
fun findSimilarRecords(records: List<String>, target: String): Int {
/**
 * This exercise aims to find the number of similar records in a given list of records,
 * based on identity comparison, using a for loop.
 *
 * @param records A list of records (strings).
 * @param target The target record (string) for comparison.
 * @return The number of similar records (int) found in the list.
 *
 * Example:
 * findSimilarRecords(listOf("Record1", "Record2", "Record1", "Record3"), "Record1") -> 2 (two similar records)
 */
fun findSimilarRecords(records: List<String>, target: String): Int {

    var count = 0

    for (record in records) {
        if (record === target) {
            count++
        }
    }

    return count
}