Developer Interview Questions

269,410 developer interview questions shared by candidates

The problem involves processing a 2D array representing an image, where each pixel is either a `0` or `1`. The array may contain one or more rectangular regions of `0`s surrounded by `1`s. The tasks are: 1. **Identify Rectangles**: Write a function that detects all rectangles of `0`s in the 2D array, returning the coordinates of the top-left and bottom-right corners for each rectangle. 2. **Handle Multiple Rectangles**: Adapt the solution to correctly identify and manage multiple separate rectangles within the image. 3. **Check Point Inside Rectangles**: Implement functionality to determine if a given point is inside any of the detected rectangles.
avatar

Senior Android Developer

Interviewed at Reddit

3.9
Oct 11, 2024

The problem involves processing a 2D array representing an image, where each pixel is either a `0` or `1`. The array may contain one or more rectangular regions of `0`s surrounded by `1`s. The tasks are: 1. **Identify Rectangles**: Write a function that detects all rectangles of `0`s in the 2D array, returning the coordinates of the top-left and bottom-right corners for each rectangle. 2. **Handle Multiple Rectangles**: Adapt the solution to correctly identify and manage multiple separate rectangles within the image. 3. **Check Point Inside Rectangles**: Implement functionality to determine if a given point is inside any of the detected rectangles.

What will be printed after the following code? class TestClass { var aBlock: (() -> ())? = nil let aConstant = 5 init() { print("init") self.aBlock = { print(self.aConstant) } } deinit { print("deinit") } } var testClass: TestClass? = TestClass() testClass = nil
avatar

IOS Developer

Interviewed at Fiverr Inc.

4.1
Feb 8, 2018

What will be printed after the following code? class TestClass { var aBlock: (() -> ())? = nil let aConstant = 5 init() { print("init") self.aBlock = { print(self.aConstant) } } deinit { print("deinit") } } var testClass: TestClass? = TestClass() testClass = nil

first exam included basic logical questions : 1. what is the angle of a analog watch showing 3:15 2. Imagine you'r in the desert, needed to cross 700km of sand. you have 7kg gold bar which you can only cut twice. in order to cross the desert you found yourself a vicious taxi driver which will take apportion of that gold bar and it will be equivalent to the km he will take you. you cant pay in front the whole 7kg. 3. 9 barrels riddle : you can scale only twice the barrels however you want, all eight barrels weight is equivalent except one heavier barrel. find the heavy barrel.
avatar

Security Software Engineer, Automation Developer Student Position

Interviewed at Nyotron Information Security

3.9
Jun 29, 2016

first exam included basic logical questions : 1. what is the angle of a analog watch showing 3:15 2. Imagine you'r in the desert, needed to cross 700km of sand. you have 7kg gold bar which you can only cut twice. in order to cross the desert you found yourself a vicious taxi driver which will take apportion of that gold bar and it will be equivalent to the km he will take you. you cant pay in front the whole 7kg. 3. 9 barrels riddle : you can scale only twice the barrels however you want, all eight barrels weight is equivalent except one heavier barrel. find the heavy barrel.

Viewing 2341 - 2350 interview questions

Glassdoor has 269,410 interview questions and reports from Developer interviews. Prepare for your interview. Get hired. Love your job.