/**
 * Given a list of transactions and a set of accounts, remove any duplicate entries present in the transactions.
 *
 * @param transactions a list of transactions, where each transaction is a string
 * @param accounts a set of account names
 * @return a list of transactions with duplicate entries removed
 */
fun deleteDuplicateEntries(transactions: List<String>, accounts: Set<String>): List<String> {

    val uniqueTransactions = mutableListOf<String>()

    for (transaction in transactions) {
        if (!uniqueTransactions.any { it.split(" ")[0] in transaction }) {
            uniqueTransactions.add(transaction)
        }
    }

    return uniqueTransactions
}

// A small test case
/**
 * Given a list of transactions and a set of accounts, remove any duplicate entries present in the transactions.
 *
 * @param transactions a list of transactions, where each transaction is a string
 * @param accounts a set of account names
 * @return a list of transactions with duplicate entries removed
 */
fun deleteDuplicateEntries(transactions: List<String>, accounts: Set<String>): List<String> {
/**
 * Given a list of transactions and a set of accounts, remove any duplicate entries present in the transactions.
 *
 * @param transactions a list of transactions, where each transaction is a string
 * @param accounts a set of account names
 * @return a list of transactions with duplicate entries removed
 */
fun deleteDuplicateEntries(transactions: List<String>, accounts: Set<String>): List<String> {

    val uniqueTransactions = mutableListOf<String>()

    for (transaction in transactions) {
        if (!uniqueTransactions.any { it.split(" ")[0] in transaction }) {
            uniqueTransactions.add(transaction)
        }
    }

    return uniqueTransactions
}

// A small test case