4 ms·
Here are a few questions/problems I was asked in from-end interviews a couple months ago: Write a function that accepts an array of ints and a target number. I
by pauljaworski 10y ago
Here are a few questions/problems I was asked in from-end interviews a couple months ago:
Write a function that accepts an array of ints and a target number. If two of the numbers in the array can add up to the target, return their indices. (aka Two Sum)
Write a function that accepts an int x and prints a spiral of "#"s so that the number of "arms" in the spiral equals x.
Write a function that accepts a month and a year, and draws a calendar view of that month.
Given a non-negative int x, repeatedly add all its digits until the result has only one digit.
I think I was also asked something that involved a tree structure, but I can't remember the specific problem.
I thought all of those questions were fucking stupid. The good interviewers, IMO, gave me a "take-home" problem of building some mini front-end app that hit an API, and the really fun one involved reverse engineering an unpublished API - that's how I got my current job.
I spent a lot of time studying the h5bp Front End Interview Questions[1], and the only front-end specific question I was asked was, "What is an SVG sprite?" during an initial phone chat with a CEO.
1. https://github.com/h5bp/Front-end-Developer-Interview-Questions https://github.com/h5bp/Front-end-Developer-Interview-Questi...
- enraged_camel 10y ago>>The good interviewers, IMO, gave me a "take-home" problem of building some mini front-end app that hit an API, and the really fun one involved reverse engineering an unpublished API - that's how I got my current job. I agree with you, but whenever this subject comes up, a lot of folks here on HN complain that they have full-time jobs and families and don't have time for "take-home" questions.
- hifumi 10y agoIt sound like those people don't want to devote the time to get a new job. And thus don't really want the job.
- pauljaworski 10y agoI understand that point, but I just personally hate the stress and the irrelevance of the "over-the-shoulder" algorithm problems that a recent CS grad would be almost more suited to answering. If I'm really interested in working for a company, I have no issue spending a couple hours building a little app to prove my chops.