Well, your Resume looks good, I think were all set. Oh, one more thing...

Well, your Resume looks good, I think were all set. Oh, one more thing, show us you can reverse an integer mathematically.

def reverse(num):
reverse = 0
while num > 0:
reverse = reverse*10 + num%10
num = int(num/10)
return reverse

I can do it for a binary integer in assembly

you must mean reverse the digits, and by mathematically you must mean using traditional mathematics and not using a machine designed specifically to make a process like that easy such as a computer.

Such problems have already been solved and I'm happy to google the answer for you. Given half an hour to review the appropriate materials and another 30 minutes to develop test cases and a solution, I'd be happy to show you I'm capable of doing so.

Alternatively, you could challenge me with a task that would be relevant to the job you are hiring me for.

nice trips, also sorry but we found a more qualified candidate who won't make us feel stupid

This doesn't work when num[/num] is a multiple of 10.

Wow sry about the code tag lmao

>mathematically
what? just bitwise shift idiot

lol this is what I would say and hence will never get a job in software. fuck hr.

i'd also say:

>mathematically
turing machines are mathematical constructs so using strings should be ok. perhaps you meant arithmetically?

Sure thing: int reverse(int x) { return x; }

This reverses the base-2147483648 number x in constant time

clever girl. i'd hire your nerdy ass

Well thanks for your time, user. We have lots of people to interview so we'll be in touch.

Base-2?
uint32_t reverse(uint32_t x) {
x = (x > 16) & 0x0000FFFF; /* swap words */
x = (x > 8) & 0x00FF00FF; /* swap bytes */
x = (x > 4) & 0x0F0F0F0F; /* swap nybbles */
x = (x > 2) & 0x33333333; /* swap couplets */
x = (x > 1) & 0x55555555; /* swap bits */
return x;
}

80 columns.

It works fine

The reversed integer of 10 is 1, 110 is 11, etc.

>tab is size of 4 spaces
sory but we do not hire special needs kids.

>indenting with anything else but 4 spaces

Found the actual retard

Infidel

tab is supposed to be 8 space wide, dumb fuck.

I use 16 spaces to prevent me from nesting too much. alot of nesting means bad code. get on my level.

No worries. Your lack of insight into the real world challenges of developing and maintaining complex software has enlightened me. The probable outcome is that your company will eventually attempt to replace local engineers with a team of outsourced workers in the third-world. The few remaining Senior Engineers will then either quit out of frustration, become alcoholics, or die of job-related stress. From there, your products and company will begin to atrophy. All because antiquated hiring practices and useful idiots like yourselves are unknowingly killing the proverbial golden goose. My only regret is that I won't have a fiddle to play while your company burns to the ground due to internal incompetence.

>I use 16 spaces
Yeah, well you are dumb fuck.

if (x == 3) { return Ɛ; }

I could do this for other integers but I don't work for free, you have to hire me first.

haha

/thread

kek

>indenting with tabs

Okay, you literally are retarded. 4 spaces, not a tab.

Go flip the hamburgers, McDonald

dumb reddit poster.

>heh, he hit enter while he was typing, must be from reddit

typical projecting redditard

>projecting
you're just full of bait, aren't you?

I predicted what you would post 2 posts ago. How does that make you feel?

dumb nigger poster.

TFW t.brainlet when it comes to math, but i still land programming jobs.

Even I think I should not be hireable because my math skills are so shit.
But yet here is am, building speed critical systems without any further knowledge than algebra III.

int reverse(const int x) {
return __bswap_64(x);
}

I assume you meant find the inverse, in which case I can pull the euclidian algorithm out of my ass faster than you can say remainder

>we'd like you computer the primes under 2 million and sum them, implement bubble sort on a whiteboard, and show us your fizz buzz. One, two, three - go!
How fucked are you?

This problem usually means to reverse the string of an integer in base 10.

>computer the primes
lol
with what probability?

p fugged

num = num * -1

not fucked, ill refuse and show my resume to a better company, if i get asked a question like that i know i made a mistake applying. this kind of shit only hampers people trying to get into hip companies that look good on paper without having much experience

I hope you two are joking, if you can't do the 3 listed things you definitely won't be hired anywhere, interview questions literally cannot get easier.

i can do all of them, i just refuse to do so in an interview

anyone who looks at my resume and then asks me to write fizzbuzz is too stupid to live tbqh

Shut the fuck you little burger flipping faggot

sorry, I am a programmer, I don't math.

>t. brainlet

>sorry, I am a programmer, I don't math.
So true, so true.

Define "reverse an integer mathematically."