mirror of
https://github.com/krahets/hello-algo.git
synced 2025-11-02 21:24:53 +08:00
idomatic structure rust code, no include macro (#1528)
This commit is contained in:
@ -3,9 +3,7 @@
|
||||
* Created Time: 2023-03-11
|
||||
* Author: codingonion (coderonion@gmail.com)
|
||||
*/
|
||||
|
||||
include!("../include/include.rs");
|
||||
|
||||
use hello_algo_rust::include::print_util;
|
||||
/* 基于环形数组实现的双向队列 */
|
||||
struct ArrayDeque {
|
||||
nums: Vec<i32>, // 用于存储双向队列元素的数组
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* Author: WSL0809 (wslzzy@outlook.com), codingonion (coderonion@gmail.com)
|
||||
*/
|
||||
|
||||
include!("../include/include.rs");
|
||||
use hello_algo_rust::include::print_util;
|
||||
|
||||
/* 基于数组实现的栈 */
|
||||
struct ArrayStack<T> {
|
||||
|
||||
@ -4,8 +4,7 @@
|
||||
* Author: codingonion (coderonion@gmail.com), xBLACKICEx (xBLACKICEx@outlook.com)
|
||||
*/
|
||||
|
||||
include!("../include/include.rs");
|
||||
|
||||
use hello_algo_rust::include::print_util;
|
||||
use std::collections::VecDeque;
|
||||
|
||||
/* Driver Code */
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* Author: codingonion (coderonion@gmail.com)
|
||||
*/
|
||||
|
||||
include!("../include/include.rs");
|
||||
use hello_algo_rust::include::print_util;
|
||||
|
||||
use std::cell::RefCell;
|
||||
use std::rc::Rc;
|
||||
|
||||
@ -4,9 +4,8 @@
|
||||
* Author: codingonion (coderonion@gmail.com)
|
||||
*/
|
||||
|
||||
include!("../include/include.rs");
|
||||
use hello_algo_rust::include::{print_util, ListNode};
|
||||
|
||||
use list_node::ListNode;
|
||||
use std::cell::RefCell;
|
||||
use std::rc::Rc;
|
||||
|
||||
|
||||
@ -4,9 +4,8 @@
|
||||
* Author: codingonion (coderonion@gmail.com)
|
||||
*/
|
||||
|
||||
include!("../include/include.rs");
|
||||
use hello_algo_rust::include::{print_util, ListNode};
|
||||
|
||||
use list_node::ListNode;
|
||||
use std::cell::RefCell;
|
||||
use std::rc::Rc;
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* Author: codingonion (coderonion@gmail.com), xBLACKICEx (xBLACKICEx@outlook.com)
|
||||
*/
|
||||
|
||||
include!("../include/include.rs");
|
||||
use hello_algo_rust::include::print_util;
|
||||
|
||||
use std::collections::VecDeque;
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* Author: codingonion (coderonion@gmail.com)
|
||||
*/
|
||||
|
||||
include!("../include/include.rs");
|
||||
use hello_algo_rust::include::print_util;
|
||||
|
||||
/* Driver Code */
|
||||
pub fn main() {
|
||||
|
||||
Reference in New Issue
Block a user