REEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE

REEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE

Attached: 42538000.png (960x935, 229K)

Pic related is what you need to do on paper in CS.
They need to test if you know your shit, you are not expected to actually write code like this retard.

Also, that solution with + causes overflows.

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

Attached: c_exercise.png (680x240, 9K)

overflow error in some language

why is this board full of retarded pseudointellectual posers like these two insufferable faggot fuckers?

wow, you heard of XOR? you finished 3 or 4 years of uni and you heard about XOR? you can SWAP two variables? HOLY FUCK! also... you know... C? it's da most difficult langooge on the planets! you must be A GENIUS! HOLY FUCK! HACKER DETECTED! wait... more like.. l33t h4xx0r!

wow nigga you know that xor is a commutative operation and that the inverse of a term is the term itself so you have a xor a = e, where e is the identity element of "xor"?

Recently i was asked some shit like this. And then i asked why i should do the linter job. They got crazy and tell me to get away(

give me your email son, you're HIRED!

>how do you swap integers without using a third variable
I don't, because if that's the more optimal method, I'm confident the interpriter and/or compiler will optimize it that way for me. The intent is more important to me than anything else, so I'd just use a third variable with a proper name for the context.

Now get out of my office.

[a,b]=[b,a]

JavaScript rocks!

I refuse to read this font.

>interpriter

Attached: qv9zlbmf4szz.jpg (645x588, 57K)

didn't mean to quote meant for cringe

Literal autism.

std::swap(a, b)

literal seethe

SWAP A, B

I didn't mean to quote you retard, calm down.

Yep i use destructuring everywhere. And i suffering when changing something in our legacy project written in dart. I want destructure but cant(
Also when pattern matching reach stage 3 there will not be any mainstream production language better then js :3

(rotatef a b)

you my friend, are based and redpilled

Oh no I made a typo, how will I live with this.

reminder threads like these are just sjw propaganda push against meritocracy-based interviews where if someone challenges your problem solving skills it means they're oppressive and you were literally micro-raped.

reminds me of when Apple got rid of the audio jack. a year before that there were daily shill threads on Jow Forums saying "jacks are shit and the reason your phone is thick"

expect around mid-2019 for sjw to declare these interviews illegal somehow.

Sucking cock well is also a merit.
Let's swap interviews to that and BTFO white cis patriarchy.

If it'll land me a job, I'm all for it

no but they will impose something like
>if it's not actual code that resembles the one used in the company's apps
or some sort of industry standard then it's illegal to ask in an interview

screncap this post, just wait and see.

*preference for women,blacks,latinxs, (LGTB whites),indians ... only in emergencies case white cis hetero males

Still fit the bill

SWAP
rpl masterrace
Hp for life

>all these bitter CS babbies having to prove they can code
Should maybe continue with education some more if your degree only puts you in competition with some Chad-lite who spent a few days doing an online course. Or maybe look for jobs which aren't just doing JavaScript.

I think the anwser is B. If you ever write code like this in production tho go fuck yourself.

What makes you so mad???

>require('swap.js')
>swap(a,b)

giv job sir

Attached: India_Street_Team.jpg (700x765, 78K)

autism

a = 3
b = 4
a = a + ':' + b
b = Number(a.split(':')[0])
a = Number(a.split(':')[1])

Give job.

int a = 5;
int b = 10;
{ int c = a; a = b; b = c; }

a, b = b, a

god reading that code is a pain
It's like somebody testing your ability to understand english by telling you a setence and telling you to translate it or something, except they spend 1 min on every letter and take couple of hours just pronouncing the word.

npm install swap

XCHG AX, BX

Hey Siri, swap the variables

a=a+b-b
b=a*b*b

lua, you beautiful bitch

Phones have been getting thicker recently though, the audio jack was dropped so that they don't have to design everything else around a giant piece with limited functionality.