6 ms·
This was an interview question at both Square and Braintree. Its weird that interview questions trend from year to year.
by justinzollars 11y ago
This was an interview question at both Square and Braintree. Its weird that interview questions trend from year to year.
- mdaniel 11y agoTo implement it or describe what it's for?
- eli 11y agoI was asked to implement it on a whiteboard for a developer gig at an ad agency in like 2009. I thought it seemed disproportionately hard compared to what the job was likely to require.
- InclinedPlane 11y agoReally? It seems like a trivial programming exercise to me.
- jarcane 11y agoI've actually done it myself for fun in Haskell; it's one of the CodeWars challenges.
- cbd1984 11y agoIt's trivial if you are told what the algorithm is. If you're expected to randomly remember it perfectly and implement it that way, it's hard.
- InclinedPlane 11y agoCertainly. That's a very poor interview process.
- justinzollars 11y agoimplement in both cases, after a clear definition.
- easytiger 11y agoIt was also on the UK GCSE IT syllabus when I were a lad. The IT syllabus was actually incredibly good. I get very sad when i see the state of the modern one.
- alextgordon 11y agoHuh? GCSE ICT was about learning to use Microsoft Office.
- Osmium 11y agoSpeak for yourself. I found the GCSE IT syllabus absolutely atrocious (this was 10ish years ago). I do remember this though, so that's something, but broadly speaking it was awful. And I mean truly, truly awful. I find it difficult to put into words. I'm so glad they're actually starting to teach programming now.
- easytiger 11y agoWhen did you do it?
- Osmium 11y agoAround 2004/2005 I think. I'd always been interested in computing, and wanted to learn some programming. I'd seen these posters up with BASIC code on them and naively assumed that's the kind of thing we'd do, only to turn up and literally to given print-outs going step-by-step how to use a word processor. "Click Start" (screenshot), "Move the mouse to Programs" (screenshot), etc. It was completely demoralizing for someone young and curious. And the teacher had zero interest too--no desire to hold a conversation or explain anything. (Not sure what those BASIC posters were about after, maybe that was for A level students). I understand that perhaps you wouldn't teach programming in ICT, but I'd at least have hoped to learn more about computing generally. The whole thing was just a very sad experience. No one there learnt anything new. Most spent their time playing games or being bored. The only good thing it taught me was that I was better off teaching myself when it came to computing, at least given the alternatives available to me back then. Edited to add: The sad thing, for me, is that I chose ICT over a foreign language (I couldn't do both in my school), while I was then top of my class in German and would've liked to continue it. But I didn't, and I'm mildly irritated about that to this day--I'm only now picking up German again. My school offered very little guidance, all things considered, but I took it for granted at the time that that's just how the system worked.
- mikekchar 11y agoIt's one of our interview questions too... I swear we did not get it from Square or Braintree. Very wierd. It's a nice one because it is easy to understand and you can TDD it fairly easily.