Daily (261/373 streak until LC cap)
Amazing graph problem. Definitely recommended, it is not that frequent to have a good problem on daily (I have put thumb up)
https://leetcode.com/problems/check-if-there-is-a-valid-path-in-a-grid/description/?envType=daily-question&envId=2026-04-27
#daily #medium #pattern #recommend
Amazing graph problem. Definitely recommended, it is not that frequent to have a good problem on daily (I have put thumb up)
https://leetcode.com/problems/check-if-there-is-a-valid-path-in-a-grid/description/?envType=daily-question&envId=2026-04-27
#daily #medium #pattern #recommend
β€3π2
Daily (262/373 streak until LC cap)
Funny, I has solved this problem 26th of March last year.
Not bad daily, however I don't see any pattern except some simple math and intuition.
https://leetcode.com/problems/minimum-operations-to-make-a-uni-value-grid/submissions/?envType=daily-question&envId=2026-04-28
#daily #medium #nopattern
Funny, I has solved this problem 26th of March last year.
Not bad daily, however I don't see any pattern except some simple math and intuition.
https://leetcode.com/problems/minimum-operations-to-make-a-uni-value-grid/submissions/?envType=daily-question&envId=2026-04-28
#daily #medium #nopattern
π3
I have decided. Next article is going to be Uber system design or Load balancers / proxies deep dive.
Dont worry, I am not switched to leetcode posting only, jut having hard time at snowflake at the moment.
Dont worry, I am not switched to leetcode posting only, jut having hard time at snowflake at the moment.
π15π₯3β€1
Daily (264/373 streak until LC cap)
Nice reminder for Dynamic Programming, not hard to be honest.
https://leetcode.com/problems/maximum-path-score-in-a-grid/description/?envType=daily-question&envId=2026-04-30
btw, yesterday's daily was a bit bullshit and hard, so skipping.
#daily #medium #pattern
Nice reminder for Dynamic Programming, not hard to be honest.
https://leetcode.com/problems/maximum-path-score-in-a-grid/description/?envType=daily-question&envId=2026-04-30
btw, yesterday's daily was a bit bullshit and hard, so skipping.
#daily #medium #pattern
β€4
Daily (265/373 streak until LC cap)
Purely math problem if you'd like to do it.
The challenge here is only to come up with smart formula.
https://leetcode.com/problems/rotate-function/description/?envType=daily-question&envId=2026-05-01
#daily #medium
Purely math problem if you'd like to do it.
The challenge here is only to come up with smart formula.
https://leetcode.com/problems/rotate-function/description/?envType=daily-question&envId=2026-05-01
#daily #medium
π3
NAT GATEWAY.
Sharing some real production learning. I was never using cloud properly as I never had to. Yesterday I needed to understand how AWS NAT GW works, and it was quite surprising.
How (in general) NAT GW works.
Client (or private server) from private network (let's say LAN, or cloud provider's private virtual network) WANTS to talk to internet.
Since client has private IP, if it directly sends the request to the destination, routers will drop it according to protocols they are using, as they need public source ip.
So what typically is done, e.g. in simple case of your home internet, you have wifi router, that serves as NAT GW and replaces your private ip to its public ip (SNAT - Source NAT). That way packet can be routed to destination
On the way back (response) NAT GW receives the packet, as it had the source public IP of initial request, performs DNAT (Destination NAT) and replaces destination to be the private client.
continuation in the next post ...
#network
Sharing some real production learning. I was never using cloud properly as I never had to. Yesterday I needed to understand how AWS NAT GW works, and it was quite surprising.
How (in general) NAT GW works.
Client (or private server) from private network (let's say LAN, or cloud provider's private virtual network) WANTS to talk to internet.
Since client has private IP, if it directly sends the request to the destination, routers will drop it according to protocols they are using, as they need public source ip.
So what typically is done, e.g. in simple case of your home internet, you have wifi router, that serves as NAT GW and replaces your private ip to its public ip (SNAT - Source NAT). That way packet can be routed to destination
On the way back (response) NAT GW receives the packet, as it had the source public IP of initial request, performs DNAT (Destination NAT) and replaces destination to be the private client.
continuation in the next post ...
#network
β€3
Generally, if I am using NAT GW in some cloud provider and want to check the logs here, what I expect to see?
I would expect to see the logs for request out (egress):
- entry 1: ec2 -> natgw, so private ip of ec2 and private ip of NAT GW.
- entry 2: natgw -> internet, so PUBLIC ip of nat gw and PUBLIC IP of internet.
However this is not how it works guys.
===
You will never see public ip of the NAT GW in flow logs in aws, because NAT GW private IP -> NAT GW public IP translation happens on IGW instance (which is also NAT in nature). What NAT GW will do is just perform SNAT from ec2 private ip to NAT's private ip.
Another learning, flow logs can be attached to different instances, and ini case this is ENI, you should understand how to analyze it properly. For example response from internet to ec2 would typically mean "ingress" as it comes FROM internat TO our private network, BUT on ENI level, the leg NAT GW -> EC2 resopnse is EGRESS, because it is coming out of NAT GW ENI to EC2.
#network #cloud
I would expect to see the logs for request out (egress):
- entry 1: ec2 -> natgw, so private ip of ec2 and private ip of NAT GW.
- entry 2: natgw -> internet, so PUBLIC ip of nat gw and PUBLIC IP of internet.
However this is not how it works guys.
===
You will never see public ip of the NAT GW in flow logs in aws, because NAT GW private IP -> NAT GW public IP translation happens on IGW instance (which is also NAT in nature). What NAT GW will do is just perform SNAT from ec2 private ip to NAT's private ip.
Another learning, flow logs can be attached to different instances, and ini case this is ENI, you should understand how to analyze it properly. For example response from internet to ec2 would typically mean "ingress" as it comes FROM internat TO our private network, BUT on ENI level, the leg NAT GW -> EC2 resopnse is EGRESS, because it is coming out of NAT GW ENI to EC2.
#network #cloud
π₯4β€1
Now the question,
Can you tell me, why we might need NAT GW in this AWS infra topology? Why not just usiong ec2 -> IGW hop, and what can be the benefit of it?
Can you tell me, why we might need NAT GW in this AWS infra topology? Why not just usiong ec2 -> IGW hop, and what can be the benefit of it?
β€3
Daily (266/373 streak until LC cap)
Pretty easy one today, without any pattern.
Hint for understanding: imagine it as digit clocks (see the comment for the picture)
https://leetcode.com/problems/rotated-digits/description/?envType=daily-question&envId=2026-05-02
#daily #medium #nopattern
Pretty easy one today, without any pattern.
Hint for understanding: imagine it as digit clocks (see the comment for the picture)
https://leetcode.com/problems/rotated-digits/description/?envType=daily-question&envId=2026-05-02
#daily #medium #nopattern
π4
andreyka26_se
Now the question, Can you tell me, why we might need NAT GW in this AWS infra topology? Why not just usiong ec2 -> IGW hop, and what can be the benefit of it?
So you left very good points, and they are all correct.
I will just extend them by one thing:
If we would skip NAT GW, we will need to buy public ip FOR EACH ec2 instance. With NAT GW, we can just buy single IP and assign it to NAT GW, then saving on IPs for each ec2 behind it.
I will just extend them by one thing:
If we would skip NAT GW, we will need to buy public ip FOR EACH ec2 instance. With NAT GW, we can just buy single IP and assign it to NAT GW, then saving on IPs for each ec2 behind it.
π5
Daily (267/373 streak until LC cap)
Easy one, go and collect the coin. It has 2 optimized solutions that you might want to know (at least one).
https://leetcode.com/problems/rotate-string/description/?envType=daily-question&envId=2026-05-03
#daily #easy #pattern
Easy one, go and collect the coin. It has 2 optimized solutions that you might want to know (at least one).
https://leetcode.com/problems/rotate-string/description/?envType=daily-question&envId=2026-05-03
#daily #easy #pattern
β€1
I thought that AI would replace QAs the first (I am backend + SRE, 8years exp, ex-Microsoft).
Now I believe QAs might be needed more than software devs. Talking about small projects, I am mostly vibe coding, and even stopped checking the code. I am just validating end result (qa job). It doesnβt worth it to build test infra, as you WILL need to manually check it is corect. So as experienced engineer I am doing around 20% of SWE job and 80% of QA jobβ¦οΏΌ
Ai is good at producing stuff, but can hallucinate, so responsibility and validation is still needed to be done by human. For big projects in big tech, mostly you would have tests, but for small stuff, sorry, but typically you just need to maually validate stuff, as it is cheaper and faster without risks of losing reputation.οΏΌ
Now I believe QAs might be needed more than software devs. Talking about small projects, I am mostly vibe coding, and even stopped checking the code. I am just validating end result (qa job). It doesnβt worth it to build test infra, as you WILL need to manually check it is corect. So as experienced engineer I am doing around 20% of SWE job and 80% of QA jobβ¦οΏΌ
Ai is good at producing stuff, but can hallucinate, so responsibility and validation is still needed to be done by human. For big projects in big tech, mostly you would have tests, but for small stuff, sorry, but typically you just need to maually validate stuff, as it is cheaper and faster without risks of losing reputation.οΏΌ
β€7π1
andreyka26_se
Video message
YouTube
MESSENGER SYSTEM DESIGN IS WRONG with MS Engineer
Tech article: https://andreyka26.com/messenger-system-design-is-wrong
Github repo with emulation: https://github.com/andreyka26-git/andreyka26-distributed-systems/tree/main/Messenger/emulation
Telegram: https://t.me/programming_space
Instagram: https://β¦
Github repo with emulation: https://github.com/andreyka26-git/andreyka26-distributed-systems/tree/main/Messenger/emulation
Telegram: https://t.me/programming_space
Instagram: https://β¦
π5π₯3
Daily (268/373 streak until LC cap)
If you were into Leetcode at least a little bit - you have probably solved it at least once.
You need to know the trick unfortunately to solve it easily and fast.
https://leetcode.com/problems/rotate-image/?envType=daily-question&envId=2026-05-04
#daily #medium #nopattern
If you were into Leetcode at least a little bit - you have probably solved it at least once.
You need to know the trick unfortunately to solve it easily and fast.
https://leetcode.com/problems/rotate-image/?envType=daily-question&envId=2026-05-04
#daily #medium #nopattern
π₯4β€1
Started posting there 4-5 months ago. I would expect 20 subs max (5 of them are my friends), but it goes well, thanks Meta
https://www.threads.com/@andreyka26_se/post/DX7FKS6jEp_?xmt=AQF05kDn1LVTNVr_8hDQzzPe1uHHm7NKcblFtkvawK67ACUmONxzBNesJ_IKvYiIZ-x6yMxR&slof=1
https://www.threads.com/@andreyka26_se/post/DX7FKS6jEp_?xmt=AQF05kDn1LVTNVr_8hDQzzPe1uHHm7NKcblFtkvawK67ACUmONxzBNesJ_IKvYiIZ-x6yMxR&slof=1
π₯5
andreyka26_se
Started posting there 4-5 months ago. I would expect 20 subs max (5 of them are my friends), but it goes well, thanks Meta https://www.threads.com/@andreyka26_se/post/DX7FKS6jEp_?xmt=AQF05kDn1LVTNVr_8hDQzzPe1uHHm7NKcblFtkvawK67ACUmONxzBNesJ_IKvYiIZ-x6yMxR&slof=1
Comparing to X ahahah, greedy Musk wants me to pay for blue check box (it aint happening)
π6
Daily (269/373 streak until LC cap)
Is it nostalgia week?))
Solid problem, but a bit annoying, they might have done it much more interesting, check the comments I will explain.
https://leetcode.com/problems/rotate-list/description/?envType=daily-question&envId=2026-05-05
#daily #medium #pattern
Is it nostalgia week?))
Solid problem, but a bit annoying, they might have done it much more interesting, check the comments I will explain.
https://leetcode.com/problems/rotate-list/description/?envType=daily-question&envId=2026-05-05
#daily #medium #pattern
π2β€1π₯1
Daily (270/373 streak until LC cap)
Not bad problem, not hard, but no specific pattern eaither.
https://leetcode.com/problems/rotating-the-box/description/?envType=daily-question&envId=2026-05-06
#daily #medium #nopattern
Not bad problem, not hard, but no specific pattern eaither.
https://leetcode.com/problems/rotating-the-box/description/?envType=daily-question&envId=2026-05-06
#daily #medium #nopattern
π2β€1π₯1