SWAP variable Values without using any thread variable in swift

// frequently ask in Interview
var variableOne = 10
var variableTwo = 15

func swapValues(vOne : Int , vTwo : int) -> vOne , vTwo
{
    vOne ^= vTwo
    vTwo ^= vOne
    vOne ^= vTwo
    return vOne, vTwo
}

Comments

Popular posts from this blog

Windows Keys

how to send invite and give a access of selected application on App Store

how to display popover in TableView cell in swift