Did it some time ago. Dropbox OA, about 75 minutes and 3 questions, the platform is HackerRank, the style of questions is closer to the actual work scene, not pure algorithmic competition, the code should consider the boundary cases and readability.
I had Programhelp assist throughout the whole process, and it worked at a steady pace in real time, so I didn't get stuck in the middle of writing. Overall, I was able to make good time and had a few extra minutes at the end to run additional tests.
Examination Process
I entered the platform 10 minutes before the start, and Programhelp was ready, so we agreed that I would scan the questions first, and they would read the questions synchronously in the background. This way, I can confirm my thoughts directly with them as soon as I finish reading the questions.
The order of questions is first easy and then difficult, the first question quickly passed, the second question with a mathematical formula directly, the last question is BFS + state records, write to be careful not to miss the state of the de-emphasis. The last question is BFS + state records, be careful not to miss the state de-duplication when you write it.
Review Of Interview Questions
Problem 1: Compress String
Given a string sIf compression doesn't shorten the string, return the original. If compression doesn't shorten the string, return the original.
Example.
Input: "aaabbc"
Output: "a3b2c1"
Input: "abc"
Output: "abc"
Problem 2: Minimum Moves to Equal Array
You can increment n - 1 elements of an integer array by 1 in one move. Return the minimum number of moves to make all elements equal.
Example.
Input: [1,2,3]
Output: 3
Problem 3: Shortest Path in a Grid with Obstacles
Given a grid with 0 (empty) and 1 (obstacle), find the shortest path from top-left to bottom-right. You may remove at most k obstacles. -1 if impossible.
Example.
Input: [[0,0,0],[1,1,0],[0,0,0]], k = 1
Output: 4
problem-solving strategy
- first question: Iterate through the string directly and use a counter to count the number of consecutive characters. Finally, determine whether the compressed length is shorter, if not, return to the original string.
- second question: It's really about the math, and the end result is
sum(nums) - min(nums) * len(nums). - third question: With BFS search, treat the current position + the number of obstacles removed as state and put it in a queue. This avoids backtracking and keeps the time complexity from exploding.
Common Potholes
- The first question many people will forget the length judgment, directly return to the compressed version will lead to the output does not meet the meaning of the question.
- The second question is to be careful when finding the minimum value if the array has a negative number.
- Question 3 BFS if the status doesn't record "how many barriers were removed" will lead to duplicate accesses and performance will just blow up.
FAQ
Q: How difficult is OA?
A: A little friendlier than purely algorithmic questions, but the last question still requires more skillful searching.
Q: What knowledge do I need to prepare in advance?
A: Basic string processing, array math, BFS/DFS searching, stateful compression.
Q: Is there enough time?
A: At my pace it was enough, the key was to take the easy questions first.
Make the next OA a sure win.
For this Dropbox OA, not only did I finish all the questions without any lag, but I also did a few more tests in the last 5 minutes to make sure I didn't miss any boundary conditions.Programhelp The support is not just a ghostwriter, but the fastest way of thinking, the most steady pace, and the most relevant to your personal style, to help you make the most of your intense online exams.
If your OA or technical interview is just around the corner, instead of toughing it out alone, let an experienced partner have your back.