/**
 * This function finds and returns the highest priority task from the given list.
 */
fun findHighestPriorityTask(tasks: List<Map<String, Any>>): Map<String, Any>? {

    var highestPriority = -1
    var highestPriorityTask: Map<String, Any>? = null

    for (task in tasks) {
        if (task["priority"] as Int > highestPriority) {
            highestPriority = task["priority"] as Int
            highestPriorityTask = task
        }
    }

    return highestPriorityTask
}
/**
 * This function finds and returns the highest priority task from the given list.
 */
fun findHighestPriorityTask(tasks: List<Map<String, Any>>): Map<String, Any>? {
/**
 * This function finds and returns the highest priority task from the given list.
 */
fun findHighestPriorityTask(tasks: List<Map<String, Any>>): Map<String, Any>? {

    var highestPriority = -1
    var highestPriorityTask: Map<String, Any>? = null

    for (task in tasks) {
        if (task["priority"] as Int > highestPriority) {
            highestPriority = task["priority"] as Int
            highestPriorityTask = task
        }
    }

    return highestPriorityTask
}