Recent
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 …