mirror of
https://github.com/krahets/hello-algo.git
synced 2025-11-02 12:58:42 +08:00
🦄 refactor(rust/deque): change LinkedList to VecDeque (#364)
* 🦄 refactor(deque): change LinkedList to VecDeque * 📃 docs(deque): add author * 🦄 refactor(rust/queue): change LinkedList to VecDeque * 📃 docs(rust/queue): add author * 📃 docs(deque): corrent author format
This commit is contained in:
@ -1,17 +1,17 @@
|
||||
/*
|
||||
* File: queue.rs
|
||||
* Created Time: 2023-02-05
|
||||
* Author: sjinzh (sjinzh@gmail.com)
|
||||
* Author: sjinzh (sjinzh@gmail.com), xBLACKICEx (xBLACKICEx@outlook.com)
|
||||
*/
|
||||
|
||||
include!("../include/include.rs");
|
||||
|
||||
use std::collections::LinkedList;
|
||||
use std::collections::VecDeque;
|
||||
|
||||
/* Driver Code */
|
||||
pub fn main() {
|
||||
// 初始化队列
|
||||
let mut queue: LinkedList<i32> = LinkedList::new();
|
||||
let mut queue: VecDeque<i32> = VecDeque::new();
|
||||
|
||||
// 元素入队
|
||||
queue.push_back(1);
|
||||
|
||||
Reference in New Issue
Block a user