Рет қаралды 2,392
In this video we are solving an intersting Google interview question that deals with the quite uncommon but very cool solution pattern of Bucket Sort: Number of Weak Characters in the Game (Leetcode # 1996).
This question can easily be solved using a standard sort algorithm quite easily but there's a neat little way you can use bucket sort here to bring down the time complexity down to linear.