After 1 month of procrastinating and writing in background, it is eventually out. I guess this is the most detailed article about Stripe System Design.
Please leave your thoughts about the decisions made in the design and overall about the article.
https://andreyka26.com/payment-gateway-stripe-system-design-with-microsoft-engineer
Please leave your thoughts about the decisions made in the design and overall about the article.
https://andreyka26.com/payment-gateway-stripe-system-design-with-microsoft-engineer
andreyka26 tech
Payment Gateway (Stripe) System Design with Microsoft Engineer
I am Software Engineer at Microsoft. This is my tech blog where I would like to share my findings, guides and docs. Feel free to contact me.
❤8🔥1
For technical articles I think that will be it. We are starting soon writing about leaving Microsoft, about relocation to Ireland, about Snowflake, etc.
You gonna have the link the first ofc
You gonna have the link the first ofc
❤4👍2
Daily (116 day streak)
One of the rare cases, where problem is hard, I didin't solve it on my own, but I really liked it. Hints, geometry and intuition are in the comment section
https://leetcode.com/problems/count-number-of-trapezoids-ii/description/?envType=daily-question&envId=2025-12-03
#daily #hard
One of the rare cases, where problem is hard, I didin't solve it on my own, but I really liked it. Hints, geometry and intuition are in the comment section
https://leetcode.com/problems/count-number-of-trapezoids-ii/description/?envType=daily-question&envId=2025-12-03
#daily #hard
andreyka26_se
Daily (116 day streak) One of the rare cases, where problem is hard, I didin't solve it on my own, but I really liked it. Hints, geometry and intuition are in the comment section https://leetcode.com/problems/count-number-of-trapezoids-ii/description/?envType=daily…
As we seen, some math background is needed for the leetcode question above, which was many times asked in Google. So, let's add it as separate posts
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
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
#math
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
Daily (117 day streak)
Interesting problem, I wouldn't say it is hard, simulation will work, the trick here to write a good simulation, or figure out smart algo
https://leetcode.com/problems/count-collisions-on-a-road/description/?envType=daily-question&envId=2025-12-04
#daily #medium
Interesting problem, I wouldn't say it is hard, simulation will work, the trick here to write a good simulation, or figure out smart algo
https://leetcode.com/problems/count-collisions-on-a-road/description/?envType=daily-question&envId=2025-12-04
#daily #medium
👍2
Daily (118 day streak)
Happy Friday, enjoy, 3 minutes easy problem
https://leetcode.com/problems/count-partitions-with-even-sum-difference/description/?envType=daily-question&envId=2025-12-05
#daily #easy
Happy Friday, enjoy, 3 minutes easy problem
https://leetcode.com/problems/count-partitions-with-even-sum-difference/description/?envType=daily-question&envId=2025-12-05
#daily #easy
👍3
Daily (119 day streak)
This could have been typical dynamic programming problem for 5 mins, BUT, by 38% acceptance rate + people scresming that it should be hard one - now it is not that easy.
Spoiler, O(n^2) will give TLE. We need something more optimized here. Didn't come up with it yet, will do tomorrow after sleep
https://leetcode.com/problems/count-partitions-with-max-min-difference-at-most-k/description/?envType=daily-question&envId=2025-12-06
#daily #medium
This could have been typical dynamic programming problem for 5 mins, BUT, by 38% acceptance rate + people scresming that it should be hard one - now it is not that easy.
Spoiler, O(n^2) will give TLE. We need something more optimized here. Didn't come up with it yet, will do tomorrow after sleep
https://leetcode.com/problems/count-partitions-with-max-min-difference-at-most-k/description/?envType=daily-question&envId=2025-12-06
#daily #medium
👍1
Daily (120 day streak)
This easy feels like blessing after yesterday's question.
https://leetcode.com/problems/count-odd-numbers-in-an-interval-range/description/?envType=daily-question&envId=2025-12-07
#daily #easy
This easy feels like blessing after yesterday's question.
https://leetcode.com/problems/count-odd-numbers-in-an-interval-range/description/?envType=daily-question&envId=2025-12-07
#daily #easy
👍3
Daily (121 day streak)
Happy monday, easy problem.
https://leetcode.com/problems/count-square-sum-triples/description/?envType=daily-question&envId=2025-12-08
#daily #easy
Happy monday, easy problem.
https://leetcode.com/problems/count-square-sum-triples/description/?envType=daily-question&envId=2025-12-08
#daily #easy
👍1
Daily (122 day streak)
Happy Tuesday, actually amazing problem, exactly how medium should be. Enjoyed it, however I have read the first hint to get the idea behind the map usage.
https://leetcode.com/problems/count-special-triplets/description/?envType=daily-question&envId=2025-12-09
#daily #medium
Happy Tuesday, actually amazing problem, exactly how medium should be. Enjoyed it, however I have read the first hint to get the idea behind the map usage.
https://leetcode.com/problems/count-special-triplets/description/?envType=daily-question&envId=2025-12-09
#daily #medium
👍4
Daily (123 day streak)
Happy Wednesday. Today is interesting problem. The kind of problem, when you need to figure out few things and then solution is really trivial. For me was a bit hard to understand what is needed.
Initially I thought that we count dependency chain. E.g. in the 1st example,
THE ASK HERE IS to count the order of computers being unlocked. So
Testcase
https://leetcode.com/problems/count-the-number-of-computer-unlocking-permutations/description/?envType=daily-question&envId=2025-12-10
#daily #medium
Happy Wednesday. Today is interesting problem. The kind of problem, when you need to figure out few things and then solution is really trivial. For me was a bit hard to understand what is needed.
Initially I thought that we count dependency chain. E.g. in the 1st example,
[0,1,2] => means pc1 was unlocked from pc0, pc2 was unlocked from pc1. IT IS NOT.THE ASK HERE IS to count the order of computers being unlocked. So
[0,1,2] => also means pc1 was unlocked from pc1, and pc2 was unlocked from pc0.Testcase
[2,68,61], expected number of permutations is 2https://leetcode.com/problems/count-the-number-of-computer-unlocking-permutations/description/?envType=daily-question&envId=2025-12-10
#daily #medium
👍1🔥1
During the daily, I discovered interesting compiler optimization or whatever it is.
Case1. I'm using
Case2. I'm using
Case1. I'm using
permutations *= cnt % mod => gives 3600msCase2. I'm using
permutations = permutations * cnt % mod => gives 11ms🤔3