Interviewer gives you a fizzbuzz question

>interviewer gives you a fizzbuzz question

Attached: 1274742458213.jpg (768x576, 192K)

Other urls found in this thread:

css-tricks.com/tales-of-a-non-unicorn-a-story-about-the-trouble-with-job-titles-and-descriptions/
twitter.com/AnonBabble

>interviewer gives you a boner

Is this a meme or does this actually happen?

Only in Pokémon Heart Gold and Soul Silver

Just answer it in a professional way.
It is never about "do you know the answer" it is about "how do they respond"

I just hit them with one of these:
fizzbuzz = (lambda x:
"Fizz"*(x % 3 == 0) +
"Buzz"*(x % 5 == 0) +
str(x)*(x %3 != 0 and x % 5 != 0))

for i in range(1,101):
print(fizzbuzz(i))

I read an article about an interview where it happened and the person couldn't do it. So maybe it's a real thing.

>Python
Fucking pleb. Try this
section .data
fizz dw "Fizz", 0Ah, 0Dh
buzz dw "Buzz", 0Ah, 0Dh
fizzbuzz dw "FizzBuzz", 0Ah, 0Dh
newLine dw 0Ah, 0Dh
section .text
global _start

_start:
mov ecx, 1
loop_main:
push ecx
xor dx, dx
mov ax, cx
mov bx, 15
div bx
cmp dx, 0
jz divisb
xor dx, dx
mov ax, cx
mov bx, 3
div bx
cmp dx, 0
jz divist
xor dx, dx
mov ax, cx
mov bx, 5
div bx
cmp dx, 0
jz divisf
mov eax, ecx
call print_num
jmp resume
divisb
mov eax, 4
mov ebx, 1
mov ecx, fizzbuzz
mov edx, 10
int 0x80
jmp resume
divist
mov eax, 4
mov ebx, 1
mov ecx, fizz
mov edx, 6
int 0x80
jmp resume
divisf
mov eax, 4
mov ebx, 1
mov ecx, buzz
mov edx, 6
int 0x80
jmp resume
resume:
pop ecx
cmp ecx, 100
jz exit
inc ecx
jmp loop_main
exit:
mov eax, 1
mov ebx, 0
int 0x80
print_num:
push esi
mov esi, 0
loop_div:
mov edx, 0
mov ebx, 10
div ebx
add edx, 48
push edx
inc esi
cmp eax, 0
je print_chars
jmp loop_div
print_chars:
cmp esi, 0
je done
dec esi
mov eax, 4
mov ebx, 1
mov edx, 1
mov ecx, esp
int 0x80
add esp, 4
jmp print_chars
done:
mov eax, 4
mov ebx, 1
mov ecx, newLine
mov edx, 1
int 0x80
pop esi
ret

weak. I made one of these in x86 it's like a 3rd the size. If this thread is still alive tomorrow I'll post it.

I got fizzbuzz and a modified version of it for the first question of my interview. When I got the job I was told it was just to see if the interview was even worth their time.

I am gonna watch out fo yo shit homie. You can just make next thread tomorrow.

>fizz
The Tidal Trickster of course~

Attached: tumblr_mzik0v09CX1tof9kfo3_1280.png (500x500, 141K)

>Doing fizzbuzz with if statements
You are like babies.
#include
#define MAX_NUM 100
int main()
{
const char* strings[4] = {"%d\n", "Fizz\n", "Buzz\n", "FizzBuzz\n"};
for(int i = 0; i < MAX_NUM; i++ )
printf(strings[((i % 3) == 0) + 2*((i % 5) == 0)], i);
}

>his solutions isn't modular
laugh at this codemonkey

mapping, maxi = {3: "Fizz", 15: "-", 5: "Buzz"}, 100
for number in range(maxi):
word = [mapping[divisor] for divisor in mapping if (number + 1) % divisor == 0]
print("".join(word) if word else number + 1)

based

i remember that she responded like this
>omg math

Attached: e0stFTO.png (800x800, 84K)

#include

int main(void)
{
int i;

for (i=0; i

pajeet spotted

kek

#lang racket

(define (fizzbuzz n)
(cond
[(= n 0) (void)]
[(= (modulo n 15) 0) (display "Fizzbuzz")]
[(= (modulo n 3) 0) (display "Fizz")]
[(= (modulo n 5) 0) (display "Buzz")]
[else (display n)]))

(for ([i (in-range 1 101)])
(fizzbuzz i))

>implying
#include
#define FIZZ 3
#define BUZZ 5
void fc();
void ic();
void zc();
void bc();
void uc();
void n();
int why(int i);
char F[256] = "F";
char i[256] = "i";
char z[256] = "z";
char B[256] = "B";
char u[256] = "u";


int main(void)

{
for(int i = 1; i

css-tricks.com/tales-of-a-non-unicorn-a-story-about-the-trouble-with-job-titles-and-descriptions/

#!/usr/bin/perl

use strict;
use warnings;

for(1..100) {
my %fb = (
3 => $_ % 3 == 0,
5 => $_ % 5 == 0
);
print "Fizz" if $fb{3};
print "Buzz" if $fb{5};
print $_ unless $fb{3} || $fb{5};

print "\n";
}

The interviewer is an HR drone. What you wrote down doesn't look anything like the javascript code she has on paper. No call back for you

unironically this, as sad as it is.

For someone that just played blue and sapphire(just to the 3rd gym). What is the best of the new ones(except pikachu and eeve)? Plataform is not a problem because emulation exists

HG/SS was fun

Just write a fizzbuzz generator

let fizBuzFactory = (lines) =>{
let fizBuzz = ""
let puts = (s) => {fizBuzz += s + "\n"}
puts("int main(){")
puts(" for(int i = 0; i < "+lines+"; i++){")
for(let i = 1; i < lines; i++){
puts(" if(i == "+i+")")
if(i % 15 == 0)
puts(" puts(\"FizzBuzz\");")
else if(i % 3 == 0)
puts(" puts(\"Fizz\");")
else if(i % 5 == 0)
puts(" puts(\"Buzz\");")
else
puts(" puts(\""+i+"\");")
}
puts(" }")
puts("}")

return fizBuzz
}

Attached: best solution.jpg (251x895, 35K)

i need a fizBuzFactoryFactory for when the interviewer asks me to fizz every 7 and buzz every 12 numbers
and a decorator because somewhere down the line, someone might at some point in time want to fizz, buzz and bazz

how about you hire me first faggot

Read em and weep boys
public static void fizzBuzz(int toFizz){
for(int i = 1; i < toFizz; i++){
String wew ="fizzbuzz" + i + " ";
int w3 = ((((i-1)%3)+2) - (i%3+1)) + ((((i-1)%3)+2) - (i%3+1))/3;
int w5 = (((((i-1)%5)+2) - (i%5+1))-1) + ((i%5) + (5-(i-1)%5-1))*9/5;
int wx = (((((i-1)%5)+2) - (i%5+1))) + (((((i-1)%3)+2) - (i%3+1)) + ((((i-1)%3)+2) - (i%3+1))/3) + 8;

System.out.println(wew.substring(0, w3) + wew.substring(w5, 8) + wew.substring(wx));
}
}

>platinum
>HG/SS
>Black/White

Anything after not really worth

Impressive

Attached: AllTheAnswers.png (2752x4342, 742K)

is the Gyarados OK?

>League of Plebs

ive had a front end webpage artisan interview where the guy started asking me some CS bullshit that he knows i don't know because i don't have formal education. his face was pic related.
i said that i didn't know and asked why that was relevant for the position. he didn't reply and changed topics.
in the end he said "well i know you don't have any formal education in computer science despite this being an engineering (?) position *heh* but could you at least try this exercise? it's standard for the interview process and i have to ask you to do it [even though ur already fucking out lmaoooo]"

it was making an interactive fizzbuzz with javascript inputs.
"really?"
"yeah its okay, just try, at least give it a shot okay its fine"
i did it in 0.2 seconds. they called me back offering me a shit salary so i just turned them down, and his superior emailed me asking why i turned it down. "we are even willing to give you a go despite the fact that you dont have a diploma!"

Attached: 1527467726293.jpg (344x374, 45K)

>not making your own libfizzbuzz
>not doing literally
//compile with cc fizzbuzz.c -lfizzbuzz
#include
#include

int main ()
{
fizzbuzz_set_rule (3, "Fizz");
fizzbuzz_set_rule (5, "Buzz");
fizzbuzz_set_rule (15, "Fizzbuzz");
int i;
for (i = 0; i

>Black/White
>not Black 2/White 2

That fizzbuzz doesn't even work concurrently,.or on arbitrary streams.
#include
#include

int main(void) {
int i;
FIZZBUZZ *f;
f = fizzbuzz_init(stdout);
fizzbuzz_set_rule(f, 3, "Fizz");
fizzbuzz_set_rule(f, 5, "Buzz");
fizzbuzz_set_rule(f, 15, "Fizzbuzz");
for (i = 1; i

Thx

his fizzbuzzlib is shit but it does work on any streams you like because it returns the string which you can later do whatever you want with.

Okay, I admit that. But you can't use more than one Fizzbuzz ruleset in your program (which is the only kind of state this structure would hold), and in case it writes its output to a static buffer, it wouldn't be thread-safe.

well i did say his fizzbuzzlib is shit...

Wow that was fucking cringey. Basically it's some fucker who thinks she knows js because omg I can make some animations and getting pissed when she discovers she can't even convert a fucking timestamp into seconds and then goes on to blame it on things like "there is no bachelor of science in design!"

Fucking brainlete when will they learn