/**
 * Given two numbers x and y, perform the following operations and return the result:
 * 1. Perform a left shift on x by y bits.
 * 2. Perform a right shift on x by y bits.
 * 3. Update the value of x by performing a bitwise XOR operation between x and y.
 *
 * @param x a positive integer
 * @param y a non-negative integer
 * @return Triple containing the results of left shift, right shift, and bitwise XOR operations.
 *
 * Note:
 * - Left shift operator: x shl y
 * - Right shift operator: x shr y
 * - Bitwise XOR operator: x xor y
 */
fun shiftAndUpdate(x: Int, y: Int): Triple<Int, Int, Int> {

    // Perform left shift operation
    val leftShiftResult = x shl y

    // Perform right shift operation
    val rightShiftResult = x shr y

    // Update the value of x by performing bitwise XOR operation
    val updatedX = x xor y

    return Triple(leftShiftResult, rightShiftResult, updatedX)
}
/**
 * Given two numbers x and y, perform the following operations and return the result:
 * 1. Perform a left shift on x by y bits.
 * 2. Perform a right shift on x by y bits.
 * 3. Update the value of x by performing a bitwise XOR operation between x and y.
 *
 * @param x a positive integer
 * @param y a non-negative integer
 * @return Triple containing the results of left shift, right shift, and bitwise XOR operations.
 *
 * Note:
 * - Left shift operator: x shl y
 * - Right shift operator: x shr y
 * - Bitwise XOR operator: x xor y
 */
fun shiftAndUpdate(x: Int, y: Int): Triple<Int, Int, Int> {
/**
 * Given two numbers x and y, perform the following operations and return the result:
 * 1. Perform a left shift on x by y bits.
 * 2. Perform a right shift on x by y bits.
 * 3. Update the value of x by performing a bitwise XOR operation between x and y.
 *
 * @param x a positive integer
 * @param y a non-negative integer
 * @return Triple containing the results of left shift, right shift, and bitwise XOR operations.
 *
 * Note:
 * - Left shift operator: x shl y
 * - Right shift operator: x shr y
 * - Bitwise XOR operator: x xor y
 */
fun shiftAndUpdate(x: Int, y: Int): Triple<Int, Int, Int> {

    // Perform left shift operation
    val leftShiftResult = x shl y

    // Perform right shift operation
    val rightShiftResult = x shr y

    // Update the value of x by performing bitwise XOR operation
    val updatedX = x xor y

    return Triple(leftShiftResult, rightShiftResult, updatedX)
}