/**
 * The mergeLists function takes in two lists as arguments and merges them into a single list.
 *
 * @param list1 First list
 * @param list2 Second list
 * @return Merged list containing elements from both lists
 *
 * Example:
 * mergeLists(listOf(1, 2, 3), listOf(4, 5, 6)) => [1, 2, 3, 4, 5, 6]
 */
fun mergeLists(list1: List<Int>, list2: List<Int>): List<Int> {

    if (list1.isEmpty() && list2.isEmpty()) {
        return emptyList()
    } else if (list1.isEmpty()) {
        return list2
    } else if (list2.isEmpty()) {
        return list1
    } else {
        return list1 + list2
    }
}
/**
 * The mergeLists function takes in two lists as arguments and merges them into a single list.
 *
 * @param list1 First list
 * @param list2 Second list
 * @return Merged list containing elements from both lists
 *
 * Example:
 * mergeLists(listOf(1, 2, 3), listOf(4, 5, 6)) => [1, 2, 3, 4, 5, 6]
 */
fun mergeLists(list1: List<Int>, list2: List<Int>): List<Int> {
/**
 * The mergeLists function takes in two lists as arguments and merges them into a single list.
 *
 * @param list1 First list
 * @param list2 Second list
 * @return Merged list containing elements from both lists
 *
 * Example:
 * mergeLists(listOf(1, 2, 3), listOf(4, 5, 6)) => [1, 2, 3, 4, 5, 6]
 */
fun mergeLists(list1: List<Int>, list2: List<Int>): List<Int> {

    if (list1.isEmpty() && list2.isEmpty()) {
        return emptyList()
    } else if (list1.isEmpty()) {
        return list2
    } else if (list2.isEmpty()) {
        return list1
    } else {
        return list1 + list2
    }
}