Skip to main content

Posts

2026


Raft Stage2

··4 mins
Last time, we finished the first stage of Raft, sucessfully electing a leader without logs. In stage 2, which is the most difficult stage I think, we …

The Number of Good Subsets

·4 mins
Link Problem #You are given an integer array nums. We call a subset of nums good if its product can be represented as a product of one or more …

Raft Stage1

··4 mins
Raft #This time we are following the Raft paper and implementing the first stage of Raft, which is leader election. We will implement the leader …

Merge Two Binary Tree

·2 mins
Link Merge Two Binary Trees Problem #You are given two binary trees root1 and root2. Imagine that when you put one of them to cover the other, some …

Stone Game

·2 mins
Link: Stone Game Problem #Alice and Bob play a game with piles of stones. There are an even number of piles arranged in a row, and each pile has a …

Usage of Entry Level GPU

·2 mins
Our chat system collapsed under 20 concurrent requests Currently, I’m working on a RAG(Retrieval Augmented Generation) project, while most of …

Split a String in Balanced Strings

·2 mins
Problem Link: Split a String in Balanced Strings Problem #Balanced strings are those that have an equal quantity of ‘L’ and …

Stone Game II

··2 mins
Stone Game II #Link: Stone Game II Problem #Alice and Bob continue their games with piles of stones. There are a number of piles arranged in a row, …

How to use Microsoft AI Foundry with Langchain

··1 min
In Microsoft’s AI Foundry, it might be a bit tricky to get it work with Langchain at first. What need to be specified is different model …

My First Post

·1 min
Start using hugo to write down some tehc blogs! I will try my best to keep it 100% human written!