Fresh OA from an hour ago!!
Background: I don't need sponsorship.
A small side story: uploading my ID took forever this time. Maybe the lighting was bad, or because I was holding the ID right up against the camera, but it kept telling me it couldn't read the text. In the end it only verified after I screenshotted an old passport scan from a folder on my computer. Luckily I wasn't in a hurry... Everyone should get a clear ID scan ready ahead of time (PDF is not accepted, a PNG screenshot works).
Recent change to the test setup: on the due date, before starting, I went to CodeSignal to find a practice test to get familiar with the interface, and found there are now hidden tests. You can't see the input/output of those cases, so if they fail you still have to find the bug by reading your own code.
The screen-monitoring page has restrictions: you can look up syntax on the official docs, but you can't open pages that show you how to implement something.
Question 1: You're given the left and right endpoints of a range (three-digit numbers). Return the count of three-digit numbers in the range whose digits are all different from each other. For example, for [876, 890] the answer is 3. Among 876 to 890, the only numbers with no repeated digit are 876, 879 and 890.
Question 2: You're given an integer array numbers and a pattern array whose values can only be 1, 0 or -1. pattern[i] = 1 means numbers[i] > numbers[i-1], 0 means equal, and -1 means <. Return how many subarrays of numbers match pattern exactly (you don't need to consider a pattern longer than numbers). For example, with numbers = [3,7,5,5,8,7] and pattern = [-1,0,1] the answer is 1, because only the subarray [5,5,8] matches (5<7, pattern[0] = -1; 5 == 5, pattern[1] = 0; 8 > 5, pattern[2] = 1).
Question 3: The rotten oranges problem. You're given a character matrix for an orchard: R is rotten, H is healthy, - is empty ground. Each day, every R cell infects the healthy trees one cell away in the four directions (up, down, left, right) at the same time, turning them from H to R. Return the orchard matrix after the given number of days.
Question 4: You're given several points on a 2D plane. Two points count as overlapping if the difference in x is <= 2 and the difference in y is <= 2. Return the number of pairs of points that overlap.
Summary: after I got the OA I spent 10 days going through interview reports (not every day), and I timed myself on about five or six sets of problems. It really helped me build a feel for it and keep a steady mindset!! (I went way over time on new problems at first, but it gets much better if you keep at it. Good luck everyone.)
Discussion
Loading comments…