3 ms·
> ...print Fibonacci numbers, take a string of brackets and print if they were properly nested... I'm nowhere near elite...but hopefully none of your candidate
by bell-cot 4y ago
> ...print Fibonacci numbers, take a string of brackets and print if they were properly nested...
I'm nowhere near elite...but hopefully none of your candidates need anywhere near 1/2 hour to code stuff that simple.
- monksy 4y agoAdd testing, doc, application backend, etc. You'll go beyond 0.5hrs.
- berkle4455 4y agoAnd if a candidate submitted that for an algorithm screener (which at my company we occasionally see similar), they get rejected.
- Thrymr 4y agoI would hope that your instructions are very explicit on what is expected if you are rejecting candidates for submitting _too complete a solution_ to the problem you gave them.
- lisasays 4y ago"Application backend" for Fibanocci?
- monksy 4y agoI've never seen a take home assignment that asks for a fib. I've only have been asked about fib in whiteboarding sessions. Usually it's a "Please write a program to solve this problem with the following rules" or "Please write a service that services x,y,x"
- danwee 4y agoIt depends. The snippet of code itself, yeah, it could take less than 30min. But then what, do you submit just as it is? No, you run "main.py/main.go/main.whatever". Do we need command line parameters? Maybe? Better to set them by default? Ah, well, then we probably need a "-help" so that the parameters are self documented... or do we also add them to the README.md? Because we are adding a README.md, right? And, do we setup the git repo (because we are submitting a git repo and not a zip file, right?) the "right way"? That means different things with different programming languages. Ah, what about the tests? Should we add an easy way to run the tests (e.g., Makefile?) or do we rely on the default way to run tests in the programming language we have chosen? But what if we choose a programming language the company I'm applying for doesn't use? Well, better to document that, right? Wait, do we need to print the results in the standard output just like that? The specification of the problem doesn't say much so I better e-mail them to ask for further instructions (that will show them that I don't assume anything and I always avoid doing the wrong thing! That probably gives me points at the end of the day). 1h has passed since I sent the email and no response from them so far... umm, should I just do it my way? Ummm And so on...
- ChuckNorris89 4y ago>hopefully none of your candidates need anywhere near 1/2 hour to code stuff that simple IDK, is it that simple for everyone in tech to finish it in way less than 30 min? I think I would definitely need more than 30 min for the nested brackets validation problem and I've been in SW dev for 10 years and I'm about average in my area compared to everyone I know (non-faang/non-big-tech). The thing is, I haven't touched algorithmic riddles like that since I graduated university over 10 years ago, and none of my daily assignments at my coding jobs since, were ever anything close to that, and nor do interviews in my area (Europe) ever require those kinds of problems to be solved, so I would definitely need some time to warm up, grab a piece of paper, and think of a solution for that one. New-grad version of me who did a lot of algorithmics assignments, lab work and interview prep back in the days could definitely be faster, but this version of me who's head is filled with solving the issues assigned at work, not so much, and would need longer. When I apply to jobs in my area, most companies here just check if you have domain knowledge related to the problems you'd have to solve if you got the job. Coding riddles like that seems more of a US, big-tech, VC-unicorn kind of thing that's missing in the companies I applied at. I wouldn't mind such riddles as an interview, but I definitely would fail them if they were strictly timeboxed. I guess I'm not employee material for his company.
- jon-wood 4y agoI bet you wouldn’t, it’s not something I’ve come across before, but having seen it now I’m absolutely stealing it because it has the wonderful property of seeming complex on the surface and actually being incredibly simple.
- chihuahua 4y agoThe balanced bracket problem is one step above FizzBuzz.
- ChuckNorris89 4y agoI had no idea what fizzbuzz is without googling it. I think HN is some bubble I'm not part of.
- 4y ago
- grecy 4y ago> but hopefully none of your candidates need anywhere near 1/2 hour to code stuff that simple I have no idea how to calculate Fibonacci numbers. I'm a decent coder, have a bachelor of Software Engineering but never "loved" math. I'm sure I could learn in a three minute Google.. but I certainly couldn't do it on a whiteboard with no Google access.
- JoeAltmaier 4y agoAdd the previous two numbers to generate the next one: 1 1 2 3 5 8 13 ... That's it. Now you know.
- grecy 4y agoAfter typing that comment I googled it, and the source I read said that it must start with 0, 1, 1, 2
- JoeAltmaier 4y agoSure whatever your initial conditions are. If you start with [ 0 1 ] then it works too.
- arthurcolle 4y agoyes, the above is true. Kind of shocked that anyone could get through an intro CS course without having knowledge of this as it is a very common type of sequence. It also generalizes, apparently "Fibonacci sequences" are defined by the initial 2 values, with the rule mentioned above. I thought this was weird once but upon checking it it is true that, for example, 4 5 9 14 23 37 would also be Fib{4,5} or something. Idk it's been a long time.