They automatically give everyone OA. I applied for both frontend and backend and received OA for both within 3 days.
I will go over the questions for both positions.
Spoiler Alert: I bombed it.
I took frontend first. There is a coding question and 3 multiple choice question. And you are given 45 minutes to solve it.
Given an array A of length N. For each A[i], you have to find the height of a stair that you can make.
For example, for A[i] = 7, you can make
*
**
***Height is 3, so print 3 to console.
1 <= N <= 1e51 <= A[i] <= 1e15We know that NEED = 1 + 2 + ... + M = M * (M + 1) / 2. For each A[i], binary search for the largest M such that NEED <= A[i], and print it out. This will run in about O(27N).
Given 2 string in HTML5 in <p> XXXX <\p> in separate 2 lines. Choose the CSS that will make both strings appear in the same line.
I don't remember the specifics, but you are given float, align, inline, etc options to choose from. You can only choose 1 option.
Grab another device and use an online HTML/CSS compiler and enter all 4 options and choose the one that works.
Given a picture of a block of text that appears in esplise shape on the left and straight verticle line on the right.
What is the CSS for this? You are given a combination of shape-outside/shape-inside/float/align to choose from. You can only choose 1 option.
Grab another device and use an online HTML/CSS compiler and enter all 4 options and choose the one that works.
Given some HTML codes that displays "hello" to the screen, and select all options in javascript that appends "bob" to it such that screen now shows "hellobob".
Grab another device and use an online HTML/CSS compiler and enter all 4 options and choose the 2 that works.
That was the end of frontend questions.
For backend, things are a bit different. There is only 1 coding question to solve for 45 minutes.
Given an array of items of length N, where each item contains [name, relevance, price]. Also given sortParamenter, sortOrder, pageNumber, itemsPerPage. You have to sort it.
0 -> name, 1 -> relevance, 2 -> price.0 -> in ascending order, 1 -> in descending order.Find all the items on the specified pageNumber and return a list that contains all the names in sorted order. In case of a tie, sort it so that it still respects its relative position.
1 <= N <= 1e51 <= relevance <= 1e81 <= price <= 1e80 <= pageNumber < 101 <= itemsPerPage <= 20I coded up a WA solution based on quickselect O(N) because I saw that we only care about the top 200 elements.
[pageNumber * itemsPerPage, pageNumber * itemsPerPage + itemsPerPage) into the answer vector.This gets WA because I missed a very important detail. did not locate the bug in time, so I didn't submit it. This is the first time I was not able to solve a LeetCode-style OA question :/