PayPal - Senior Software Engineer Frontend Interview Experience
Microsoft SDE2 interview experience
PAYTM - ROUND 1 SDE Java Backend : 2-3 yrs
My Full Meta Interview Experience (Sept–Oct 2025) — Rejected
Senior Software Engineer - Frontend | Okta | Bangalore
Startup | Phone | Line Drawing Algorithm
Summary
I had a phone interview with a startup where I was given a coding challenge to implement a line drawing algorithm on a grid.
Full Experience
During my phone interview at a startup, I was presented with a coding challenge that focused on drawing a straight line between two given coordinates on a grid. The task required me to implement a function that would mark the path of the line with '1's in a 2D array, aiming for the straightest possible line. I had to consider various edge cases and ensure my solution handled different orientations and lengths effectively.
Interview Questions (1)
Implement a function drawLine(M: int, N: int, start: tuple[int, int], end: tuple[int, int]) -> [[int]] that draws as straight a line as possible between the given start and end coordinates on an M x N grid. The function should return a grid representing the path of '1's from the start to the end coordinate.
def drawLine(M:int,N:int,start:tuple[int,int],end:tuple[int,int]) -> [[int]]:
pass
For example:
# Example 1 start=(0,0) end=(8,2) M,N=9,5 [ [1,0,0,0,0], [1,0,0,0,0], [1,0,0,0,0], [0,1,0,0,0], [0,1,0,0,0], [0,1,0,0,0], [0,0,1,0,0], [0,0,1,0,0], [0,0,1,0,0] ]Example 2
M,N=7,5 start=(6,0) end=(4,4) expected=[ [0,0,0,0,0], [0,0,0,0,0], [0,0,0,0,0], [0,0,0,0,0], [0,0,0,1,1], [0,0,1,0,0], [1,1,0,0,0] ]
Example 3
M,N=4,5 start=1,0 end=1,4 expected=[ [0,0,0,0,0], [1,1,1,1,1], [0,0,0,0,0], [0,0,0,0,0] ]
The line should be as straight as possible from the start to end coordinate. Consider edge cases.