andreyka26_se
606 subscribers
586 photos
66 videos
6 files
296 links
Hey, I'm software engineer at Microsoft, with 7 years of experience. Here we are talking about F(M)AANG big tech interviews: leetcode, system design and corpo life.

YouTube: @andreyka26_se
Instagram: andreyka26_se
TikTok: @andreyka26__
Download Telegram
How to check that lines are parallel?

1. Calculate vectors out of coordinates
dx = x2 - x1, dy = y2 - y1 => vector = (dx, dy)

2. Calcualte a slope = dy / dx.

3. any two lines that have the same slope (dy/dx) are parallel

#math
👍4
How to check that two vectors are collinear (share the same line)

The idea behind is to calculate where both vector would intercept Y axis.
We can do it using line formula y = kx + b. For every single point in all vectors we know x, y, k = dy / dx. From these values we can find b

#math
1👍3