Code Warrior 1

This task involves image analysis and good knowledge of logarithmic equations. Though you can use any method to provide your solution.

Problem statement:- Assume there is a rectangular image. Each pixel in the image represents a point. A group of pixels forms a tile. The whole image is divided into a series of tiles. Now we wish to overlay a polygonal line on the rectangle.

You must identify all the points where the polygonal line touches the rectangle.

Input 1. A rectangle of length l and breadth b.

Input 2. An array of co-ordinates for the polygonal line.

Input 3. Size of the Squared tile. It can be of size PxP where P is the number of pixels.

Output:- Find out all the tiles from which the lines pass through.

Code challenges start on 09-Sep-2020 and end on 23-Sep-2020.

Parasa Kiran

Parasa Kiran is a technology leader and founder of TripMantu with 23+ years of experience in software architecture, product engineering, artificial intelligence, and scalable systems design. He writes about technology, product innovation, and the practical application of emerging technologies.

This Post Has One Comment

  1. This is a good little coding challenge, perhaps something like this should be included on our coding tests for interviews platform!

Leave a Reply

Close Menu
Follow by Email
Facebook
Google+
Twitter
LinkedIn