mirror of
https://github.com/krahets/hello-algo.git
synced 2025-07-29 13:23:09 +08:00
Polish rust (#1777)
* Polish rust * Update array queue and linkedlist queue * Update linkedlist deque * make array deque generic
This commit is contained in:
@ -90,7 +90,7 @@ impl MyList {
|
||||
panic!("索引越界")
|
||||
};
|
||||
let num = self.arr[index];
|
||||
// 将将索引 index 之后的元素都向前移动一位
|
||||
// 将索引 index 之后的元素都向前移动一位
|
||||
for j in index..self.size - 1 {
|
||||
self.arr[j] = self.arr[j + 1];
|
||||
}
|
||||
|
Reference in New Issue
Block a user