No bb . Show me the code

1. 简单实现

考虑优化

2. 优化

3. 有序区