/**
 * Find all duplicate values in the accountantRecords list
 */
fun findDuplicates(accountantRecords: List<Int>): List<Int> {

    // Initialize an empty list to store the duplicate values
    val duplicates = mutableListOf<Int>()

    // Iterate through each element in the accountantRecords list
    for (i in accountantRecords.indices) {
        // Get the current element
        val currentElement = accountantRecords[i]

        // Check if the current element appears after its current position
        if (currentElement in accountantRecords.subList(i + 1, accountantRecords.size) && currentElement !in duplicates) {
            duplicates.add(currentElement)
        }
    }

    return duplicates
}
/**
 * Find all duplicate values in the accountantRecords list
 */
fun findDuplicates(accountantRecords: List<Int>): List<Int> {
/**
 * Find all duplicate values in the accountantRecords list
 */
fun findDuplicates(accountantRecords: List<Int>): List<Int> {

    // Initialize an empty list to store the duplicate values
    val duplicates = mutableListOf<Int>()

    // Iterate through each element in the accountantRecords list
    for (i in accountantRecords.indices) {
        // Get the current element
        val currentElement = accountantRecords[i]

        // Check if the current element appears after its current position
        if (currentElement in accountantRecords.subList(i + 1, accountantRecords.size) && currentElement !in duplicates) {
            duplicates.add(currentElement)
        }
    }

    return duplicates
}