/**
 * This exercise involves finding the XOR (exclusive OR) of all numbers within a given range, including negative values.
 * The XOR operator (^) returns the bitwise exclusive OR of two integers.
 *
 * Your task is to write a Kotlin function that takes in a starting and ending number as arguments and returns the XOR of all the numbers within that range,
 * including negative values.
 *
 * For example, if the starting number is -5 and the ending number is 5, the function should return the XOR of all numbers from -5 to 5.
 *
 * Your solution should be able to handle large ranges efficiently.
 *
 * Example:
 * xorNegativeRange(-5, 5) --> -10
 *
 * Explanation:
 * -5 ^ -4 ^ -3 ^ -2 ^ -1 ^ 0 ^ 1 ^ 2 ^ 3 ^ 4 ^ 5 equals -10
 */
fun xorNegativeRange(start: Int, end: Int): Int {

    // Check if the given range contains only negative values
    if (start <= 0 && end <= 0) {
        // If so, return the XOR of the negative numbers
        return xorNegative(start, end)
    } else if (start <= 0 && end > 0) {
        // Implement the logic for handling ranges with both negative and positive values
        // Your implementation here
    }
    // Handle other cases if needed
    return 0
}

fun xorNegative(start: Int, end: Int): Int {
    // Implement the XOR logic for negative numbers
    // Your implementation here
    return 0
}
/**
 * This exercise involves finding the XOR (exclusive OR) of all numbers within a given range, including negative values.
 * The XOR operator (^) returns the bitwise exclusive OR of two integers.
 *
 * Your task is to write a Kotlin function that takes in a starting and ending number as arguments and returns the XOR of all the numbers within that range,
 * including negative values.
 *
 * For example, if the starting number is -5 and the ending number is 5, the function should return the XOR of all numbers from -5 to 5.
 *
 * Your solution should be able to handle large ranges efficiently.
 *
 * Example:
 * xorNegativeRange(-5, 5) --> -10
 *
 * Explanation:
 * -5 ^ -4 ^ -3 ^ -2 ^ -1 ^ 0 ^ 1 ^ 2 ^ 3 ^ 4 ^ 5 equals -10
 */
fun xorNegativeRange(start: Int, end: Int): Int {
/**
 * This exercise involves finding the XOR (exclusive OR) of all numbers within a given range, including negative values.
 * The XOR operator (^) returns the bitwise exclusive OR of two integers.
 *
 * Your task is to write a Kotlin function that takes in a starting and ending number as arguments and returns the XOR of all the numbers within that range,
 * including negative values.
 *
 * For example, if the starting number is -5 and the ending number is 5, the function should return the XOR of all numbers from -5 to 5.
 *
 * Your solution should be able to handle large ranges efficiently.
 *
 * Example:
 * xorNegativeRange(-5, 5) --> -10
 *
 * Explanation:
 * -5 ^ -4 ^ -3 ^ -2 ^ -1 ^ 0 ^ 1 ^ 2 ^ 3 ^ 4 ^ 5 equals -10
 */
fun xorNegativeRange(start: Int, end: Int): Int {

    // Check if the given range contains only negative values
    if (start <= 0 && end <= 0) {
        // If so, return the XOR of the negative numbers
        return xorNegative(start, end)
    } else if (start <= 0 && end > 0) {
        // Implement the logic for handling ranges with both negative and positive values
        // Your implementation here
    }
    // Handle other cases if needed
    return 0
}

fun xorNegative(start: Int, end: Int): Int {
    // Implement the XOR logic for negative numbers
    // Your implementation here
    return 0
}