---
title: "Discussion on \"Big sister of swap(x,y) function\" | Hashnode"
description: "Discussion on \"Big sister of swap(x,y) function\". How do you think, if you would need to generalize swap(x,y) function - How it would look like ? We all know that in standard case swap() is just:\nx,y = y,x;\nBut if swap could accept 3 elements or even more, up until n, - How it would act ? Or we can ..."
url: "https://hashnode.com/posts/big-sister-of-swapxy-function/5e21c13c32d5fad159b705da"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Big sister of swap(x,y) function](https://agniusvasiliauskas.hashnode.dev/big-sister-of-swapxy-function?utm_source=hashnode&utm_medium=feed)

How do you think, if you would need to generalize swap(x,y) function - How it would look like ? We all know that in standard case swap() is just: x,y = y,x; But if swap could accept 3 elements or even more, up until n, - How it would act ? Or we can ...

Jan 17, 2020 · agniusvasiliauskas.hashnode.dev  
Read the article

-   [#algorithms](https://hashnode.com/tag/algorithms)

## Written by

[Agnius Vasiliauskas](https://hashnode.com/@AgniusVasiliauskas)

@AgniusVasiliauskas · Vilnius, Lithuania

  
[View profile](https://hashnode.com/@AgniusVasiliauskas)

php-dev

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
