Well, it's been great to hear about your background and experiences user...

>Well, it's been great to hear about your background and experiences user. Just one more thing before we make our hiring decision...

Attached: whiteboard.jpg (500x500, 22K)

Other urls found in this thread:

en.wikipedia.org/wiki/Cycle_detection#Floyd's_Tortoise_and_Hare
myredditnudes.com/
twitter.com/NSFWRedditImage

“Hmm… you know what? I’m really sorry, but I think maybe we got our wires crossed somewhere here. I’ve had experience on the hiring side of this sort of interview style in the past, and I’ve seen it result in some really sub-optimal matches, so I’ve adopted a policy of having certain deal breaker cues in the interviewing process. So at this point I can safely say I’d be unlikely to accept an offer, and I really wouldn’t want to waste any more of your time. To make up for the time I have wasted, I’d be happy to put you in touch with people in my network that I think would be a better fit for this style of organization.”

Why are whiteboards so hard for Jow Forums?

are we posting best of interview threads?

Attached: whiteboard.png (669x377, 90K)

Because we're all college freshmen here. If you're not, you should probably reconsider your life choices seeing that you're hanging out on a friday night with a bunch of literal retards.

i would unironically watch this show

I'm technically a sophomore

see you here in 20 years friendo

Zero prior experience to solving problems on the spot in person.

You guys don't have friends who program that you talk to about algorithms?

1
2
Fizz
4
Buzz
Fizz
7
8
Fizz
Buzz
11
Fizz
13
14
FizzBuzz

>please write a sorting algorithm
sure, no problem:
function f() {
sleep "$1"
echo "$1"
}
while [ -n "$1" ]
do
f "$1" &
shift
done
wait

based sleepsorter

Speak for yourself, my school's CS exams were all white-board style problems and I did well.

I just drop spaghetti in interviews because I usually want the job so damn bad.

Yeah, sure... THAT'S why you don't get the job...

Yes, they're friends though. People I know well, you don't know the interviewer. Even then, I don't exactly talk about random interview questions for an hour to friends.

>indirectly calling youself a sub-optimal match

For me personally, I can't really concentrate in front of people. Pen and paper alone I can do just fine, but my brain blocks if there's someone watching me.

What you’re really saying (very nicely) is “you need to work on your hiring process, so I’m not interested in working here, but I can probably scrounge up a few of the kind of C players on Jow Forums that would be a better fit for you.”

Maybe this is just me, but I have this mode I go into when "presenting" something that makes me come across well

I’ve had experience on the hiring side of this sort of interview style in the past, and I’ve seen it result in some really sub-optimal matches
>i've rolled out the whiteboard before and the candidates were suboptimal
>now you're rolling it out on me
It's a longwinded way of saying "you can't reject me, I reject you" and is basically giving up before you even know what the task is.

some people got it, some don't.

Shouldn't come as a surprise that most people in CS are introverts, have some social anxiety, or just aren't good at articulating themselves. Probably the reason why you see CS people complain the most about interviews more than any other field.

>"you can't reject me, I reject you"
yes because unless you're desperate for a job, you wouldn't want to work for these types of employers that treat you like cattle from the get-go

Background check, so a former employer at a shitty company provides bad feedback so you don't get the job.

It's probably because I have a job doing physics demonstrations for schools desu

literally the best sorting algorithm

Screening sucks

you say that like its a normal thing

Attached: questionmarsk.jpg (600x600, 123K)

How complex are these questions usually

Here's one Google asked me: Imagine you have a flight of stairs. You can either walk one step or two steps at the time. If there are N steps, how many ways can you climb the stairs?

>*picks cyan, magenta, yellow and black pens*
>*draws on the white board really quickly, dot by dot the result that looks like a shitty powerpoint page*
>*also do the invisible yellow dots, but write rude text on it instead of botnet timestamps*

Thanks, let me just notify HR that this packet can be filed away.

"Stacy, add him to the industry blacklist"

nice pure math math problem. can I have a programming question please?

You can solve it with programming, it's actually babby tier once you see it but it takes some thinking.

They also asked me these two:
How do you reverse a string in-place?

If you have a singly linked list of nodes, how can you detect if it is circular?

You might like this book. It is focused on wall st. interviews but a lot of these questions are just logic tests. Ofc this won't help you fizzbuzz
It's in 15th edition now

Attached: hots.jpg (375x500, 40K)

Forgot half of the question: And not only if it is circular, but how big the cycle is.

>HR
>Stacy
>industry blacklist
at least I will die with dignity
can you say the same, bootlicker?

Is the answer 2^(n-1)?

if there are 3 steps you can only climb them 3 ways, so i doubt it

No. I can give you a hint:
If N=1, there's only one way to climb it: Take a single one-step.
If N=2, there's two ways to climb it:
a) Take 1 two-step
b) Take 2 one-steps.

This should get you going.

For each step you take, you have two options, so it’d be N^2
Then, subtract all of the permutations that contain at least N/2 number of two-steps
Without thinking about it too hard, I think it’d be (N^2)/2

Shit, I meant 2^N and (2^N)/2

So it’s linear?

it's a simple recurrence relation. just add the 2 previous answers

Ah shit, is it Fibonacci?

Think harder:
F(1) = 1 way
F(2) = 2 ways

F(3) =
1 + 1 + 1
or
1 + 2
or
2 + 1
= 3 ways

F(4) =
1 + 1 + 1 + 1
2 + 2
2 + 1 + 1
1 + 2 + 1
1 + 1 + 2
= 5 ways

You see it yet?


BINGO!!!

And also a shoutout to you, you got it too :)

Attached: ok-thumbs-up.jpg (525x481, 39K)

ok but what does this have to do with google or programming lol this industry is beyond help lmao

>ok but what does this have to do with google
This was a whiteboard question I was asked on an on-site Google interview.

>or programming
Recurrence/recursion is frequently used in programming. This is a classic CS problem.

I’m afraid I don’t see exactly why it’s Fibonacci. I see the pattern, sure, but is there some intuitive explaination?

>college

You mean high school

Yes, this user explained it:

Is this right?
#!/usr/bin/tcc -run
#include

static int options;

static void check(int rem)
{
if (rem

ok now solve it if you can take steps of 1 to m at a time, how many ways? (where m < number of steps)

I know what the Fibonacci sequence is, I was asking why it’s the answer

Your answers are off by one

So
F(1) =
1

F(2) =
a: 1 + 1 [F(1) + F(1)]
b: 2

F(3) =
a: 1 + 1 + 1 [F(2a=F(1)*2) + F(1)
b: 2 + 1 [F(2b) + F(1)]
c: 1 + 2 [F(1) + F(2b)]

F(4) =
a: 1 + 1 + 1 +1 [F(3a=F(1)*3) + F(1)]
and so on

What is your biggest weakness, user?

Attached: images.jpg (300x168, 6K)

Lolis

Uhm.. I'm a workaholic, hehe! Just can't help myself but I'm a perfectionist when it comes to getting the job done.
Also I'm a registered sex offender with no remorse.

#lang racket
(define (steps n)
(cond
[(< n 0) 0]
[(= n 0) 1]
[else (+ (steps (- n 1)) (steps (- n 2)))]))

I think this works.

sum(f(n-m-1)..f(n-1))

>we're all college freshmen here
woah dude can I join your private club sounds cool bro

Dumb niggers asking stupid questions

I have an addiction to trap porn

wtf are you supposed to say to this question

My mom is an HR lady and I asked her why they ask it and all she said was "its a valuable question" over and over. Same thing she said about the purpose of a cover letter, "Its your opportunity to show how interested you are in the company".

Nobody works for a fucking insurance company because they love ripping people off, they do it because they get paid.

I love white boards. They filter out the brainlets.
If your only way to implement an algorithm is to memorize it before the interview, you don't deserve to be a programmer.

>How do you reverse a string in-place?
Kind of an oxymoron, you need a temp variable

>plenty of unsolved problems
and yet here you are posting on Jow Forums lmao

You're supposed to humblebrag and add how you would correct it

>I value taking the lead on projects to ensure their completion, but I've worked with feedback on task prioritization as part of a team

>oh, right, of course
>*unzips dick*

By that logic inplace algorithms can't exist at all.

I don't think they give that much of a shit about what you say (within reason), only that it's a genuine answer.

I usually say I need some time warming up for a group, and might have a hard time speaking up during meetings at first, but also that over the years this has gotten a lot better since I've been getting more and more experience in the field, and respectively, more confident.

Never let me down so far, probably because it's true.

>If you have a singly linked list of nodes, how can you detect if it is circular?
Save a reference to the head and then traverse it until you hit a reference to the head or null

if the last value of current == head, true, else false.

If its cyclical instead of circular then keep a list of your path and check against it each traversal

Yeah sure thing boss, how's this?

Attached: homu_did_nothing_wrong.jpg (670x896, 108K)

That's what I'm saying

What they mean to say is "without creating a new string/list". Its ambiguous what they consider in place because you could just fill a new object and change the pointer of the original to point to the new and the variable name didn't change.

>keep a list of your path
so the list lol

I'm a racist and a pedophile.
So when do I start blackie?

Attached: pepe_tux.png (1000x1000, 98K)

How do you check for this cycle without keeping the path?

A -> B -> C -> D -> ... -> X -> C

It's still inplace, the point is that you don't copy the string to a secondary buffer.
void reverse(char* str, size_t len)
{
for (size_t i = 0; i < len / 2; ++i)
{
char c = str[i];
str[i] = str[len - i - 1];
str[len - i -1] = c;
}
}


>If its cyclical instead of circular
Meant cyclical, yeah. English isn't my first language, sorry.

>then keep a list of your path and check against it each traversal
Actually, you can do it a lot simpler. Just track the number of hops (with a counter) and use two pointers, one increments by one and the other increments by two. Once the two are the same, then you can check the counter to check how big the cycle is.

2 pointers

>How do you check for this cycle without keeping the path?
See en.wikipedia.org/wiki/Cycle_detection#Floyd's_Tortoise_and_Hare

Perhaps pointer arithmetic is okay. You could set the lowest bit of the pointer to next to signify "seen". Once you encounter something that is seen, it is cyclical.

this one is easy. you usually read the room and then scoff at how stupid the question is if you're sure someone feels the same way.

Maybe I'm a brainlet but can't you literally just take a random element, follow the list, if you get null you reached the end but if you get back to the same place it's a cycle (and you know the number of steps it took you)? Elements need unique IDs for this to work but in practice you can't have two different elements at the same memory location so comparing pointers is entirely enough.
I can only think of this failing if the list is a circle with a tail, and you start on the tail and then end up looping through the circle forever and never revisit the tail again. Is that still a "cyclical" graph?

Interesting, I'll keep that one in mind

see you in 5 years

Here's a white board question:

>Let's say there's a collection of ants on a icosahedron (one ant per vertex). How many unique ways can the ants travel from vertex to vertex without bumping into each other?

Good luck retards.

wouldnt it make better sense to just give out tests? It's really easy to get one problem wrong and you basically just wasted 1-2 hours of your time and their time because they staked it all on one question.

>another combinatorics puzzle
*yawn^

>what the fuck is this? a question for ants?

I don't need luck, kiddo.

Yes, a «circle with a tail» is still a cyclical graph.

>interviewing
>done intelligently

literally 90% of passing interviews is luck and companies and employees are dumb.

Yea. Call the function S(n). Say you're at n steps. For the first step you have two choices: 1 or 2.
If you take 1 step he rest of the way you have S(n-1) possibilities by definition of S(): it's the same as climbing a staircase of n-1 steps.
If you take 2 steps at once, the rest of the way you have S(n-2) possibilities.
So at n, the total amount of possibilities is S(n-1) + S(n-2). Which is the definition of fibonacci.

*afterbirth drips from ears*

Ok, then how about this one:

>Given a 2^4 cube, how many edges are there, including diagonals?

your mom + 1

wtf is a 2^4 cube

>brainlet answer
What I expected.

You do know what a 2^3 cube is, right? Generalize to the fourth dimension.

He means a hyper cube.