hmnTech Profile Banner
hmncodes Profile
hmncodes

@hmnTech

Followers
2
Following
0
Media
0
Statuses
9

full stack optimization | ai/ml | math | CP

Melbourne
Joined September 2025
Don't wanna be here? Send us removal request.
@hmnTech
hmncodes
6 months
2. Solution: Client sends an Idempotency-Key header. Server stores it + result. If retried with the same key, server just returns the original response. If retried with same key but different body, reject with conflict. This makes APIs reliable under retries.
0
0
0
@hmnTech
hmncodes
6 months
I am building a url shortener to revise a few concepts. One of the things i learnt is on idempotency keys. Today’s lesson: Idempotency Keys 1. Problem: If a client retries a POST /links (timeout, network drop), you don’t want duplicate short URLs.
1
0
0
@hmnTech
hmncodes
6 months
One of the ways to solve a bug is to leave the problem for 15 mins, go for a walk, come back and it will solve itself
0
0
0
@asmah2107
Ashutosh Maheshwari
6 months
Algorithms I’d master if I had to design systems that scale: Bookmark this. 1.Consistent Hashing 2.Load Balancing Algorithms 3.Leaky Bucket & Token Bucket 4.Bloom Filters 5.Merkle Trees 6.Quorum Algorithms 7.Leader Election Algorithms 8.Distributed Lock Algorithms 9.Raft /
14
179
2K
@hmnTech
hmncodes
6 months
//If conditions inside PriorityQueue<Player> pq = new PriorityQueue<>((p1, p2) -> { if (p1.score >= 100 && p2.score >= 100) { return https://t.co/TFwZs8gb2J(p2.level, p1.level); // higher level first } return https://t.co/TFwZs8gb2J(p1.score, p2.score); });
0
0
0
@hmnTech
hmncodes
6 months
// Cleaner with Comparator API new PriorityQueue<>( Comparator.comparingInt((Node n) -> n.val) .thenComparingLong(n -> n.seq) );
0
0
0
@hmnTech
hmncodes
6 months
// Multi-key: value, then seq new PriorityQueue<>((a, b) -> { int cmp = https://t.co/TFwZs8gb2J(a.val, b.val); return (cmp != 0) ? cmp : https://t.co/o9pn5wfiKI(a.seq, b.seq); });
0
0
0
@hmnTech
hmncodes
6 months
Something i struggled with is handling comparators in priority queues here are a few notes: // Min-heap by value new PriorityQueue<>((a, b) -> https://t.co/TFwZs8gb2J(a.val, b.val)); // Max-heap new PriorityQueue<>((a, b) -> https://t.co/TFwZs8gb2J(b.val, a.val));
3
0
0
@hmnTech
hmncodes
6 months
On a quest to become a better engineer, I guess I'll start sharing here what I am working on/learning on a daily basis.
0
0
0