sukritishah15 / DS-Algo-Point

This repository contains codes for various data structures and algorithms in C, C++, Java, Python, C#, Go, JavaScript, PHP, Kotlin and Scala
MIT License
952 stars 292 forks source link

Swap two numbers without third variable #593

Open niranjantuty opened 4 years ago

niranjantuty commented 4 years ago

🚀 Feature

Given two variables x and y, swap two variables without using a third variable.

Input: x = 2, y = 1 Output: x = 1, y = 2

Have you read the Contribution Guidelines?

Yes.

Pitch

This is a common interview question asked for freshers.

Assignees

@RohanK6 - Java @ankit9905 - C++ @DefCon-018 - Python @yashkansal - C @Shrey2002 - C#, PHP @arsh9806 - JS @DineshSolanki - Kotlin @beardedasianlad - GO @FionaFR - Scala

RohanK6 commented 4 years ago

If available, I can do this in Java.

ankit9905 commented 4 years ago

i Can do this in C++

DefCon-018 commented 4 years ago

i want to do this in python

yashkansal commented 4 years ago

I can do this in c

Shrey2002 commented 4 years ago

i can do this in C#

niranjantuty commented 4 years ago

@RohanK6 - Java @ankit9905 - C++ @DefCon-018 - Python @yashkansal - C @Shrey2002 - C#

Assigned. Go ahead :)

Shrey2002 commented 4 years ago

Can I also get this in PHP?

arsh9806 commented 4 years ago

Please assign this to me for Javascript

niranjantuty commented 4 years ago

@Shrey2002 - PHP @arsh9806 - JS Assigned !

DineshSolanki commented 3 years ago

please can you assign me this for Kotlin, I'll be glad to do it in Kotlin.

IshaanSinghal1 commented 3 years ago

Assign me to do it in Kotlin.

niranjantuty commented 3 years ago

@DineshSolanki - Kotlin Assigned (fcfs)

beardedasianlad commented 3 years ago

I would like to tackle the golang version of this.

niranjantuty commented 3 years ago

@beardedasianlad - GO Assigned!

kesher988 commented 3 years ago

can i do it in c

Aditya489 commented 3 years ago

can you assign me this task ? thank you

Aditya489 commented 3 years ago

can you assign me this task ? thank you

i can do this in python

chandrikagottappu commented 3 years ago

can i do this task?

sudsali commented 3 years ago

please assign this to me i can do this in c++

AvadhootK commented 3 years ago

please assign this to me for Java.

sameershekhar100 commented 3 years ago

please assign this to me I can do this in C, Java, Python

FionaFR commented 3 years ago

Can you please assign Scala for me?

niranjantuty commented 3 years ago

@FionaFR - Scala assigned!

FionaFR commented 3 years ago

Can you please add #hacktoberfest-accepted for this issue?

niranjantuty commented 3 years ago

@Shrey2002 You're still working on this in PHP?

va1m commented 3 years ago
var a = 5;
var b = 7;

a ^= b;
b ^= a;
a ^= b;

assert a == 7;
assert b == 5;
HitIt007 commented 3 years ago

I want to this java, python,c, c++

va1m commented 3 years ago

I want to this java, python,c, c++

This is java: https://github.com/sukritishah15/DS-Algo-Point/issues/593#issuecomment-708530361

LaxmiNyamagoud commented 3 years ago

can I work on php?

amankumar988 commented 3 years ago

I want to do this in C

sunilgknair051 commented 3 years ago

A fair warning to all the newcomers commenting here and opening PRs without being assigned. Make sure you read the contributing.md before you ahead do anything. In the end, if you haven't been assigned, your PR gets rejected.

LaxmiNyamagoud commented 3 years ago

A fair warning to all the newcomers commenting here and opening PRs without being assigned. Make sure you read the contributing.md before you ahead do anything. In the end, if you haven't been assigned, your PR gets rejected.

I am really sorry, I sent above program by mistake.

sunilgknair051 commented 3 years ago

@LaxmiNyamagoud, don't worry, go through the issues, find the one you can solve, and get yourself assigned.

LaxmiNyamagoud commented 3 years ago

ok

LaxmiNyamagoud commented 3 years ago

can I work on php?

please assign this issue to me in php

sunilgknair051 commented 3 years ago

@LaxmiNyamagoud , please go through the issue from the start, and look for a word called Assigned, if a person hasn't been assigned to implement it in PHP, then I will assign it to you. Could you please tell me if it has been assigned to someone?

LaxmiNyamagoud commented 3 years ago

@LaxmiNyamagoud , please go through the issue from the start, and look for a word called Assigned, if a person hasn't been assigned to implement it in PHP, then I will assign it to you. Could you please tell me if it has been assigned to someone?

assigned!

sunilgknair051 commented 3 years ago

yep, so please choose another language to implement or another issue.

TusharKalyankar commented 3 years ago

@niranjantuty I CAN DO THIS USING JAVA

rakshitgupta23 commented 1 year ago

@sukritishah15 @niranjantuty Please assign it to mr in java or C.

sukritishah15 commented 1 year ago

@rakshitgupta23 - This has already been completed in Java and C.

P.S. I am the sole maintainer of this repository at this point of time, and no one else would/should respond regarding issue assignment or PR approval. Please respect past maintainers' time!

Thank you!

its-kundan commented 1 year ago

assign me I can do it in kotlin

shubhig226 commented 1 year ago

@niranjantuty I can do this in java. Please assign this to me.

Rishabh-mikku commented 12 months ago

Hey @niranjantuty I can do this in kotlin. Please assign this to me as I have a deep knowledge in kotlin.