🌈 style(codes/rust): fix comment style and miss comment

This commit is contained in:
xblakicex 2023-01-15 17:47:28 +01:00
parent 9b39d1577e
commit 16e4af08b6
4 changed files with 11 additions and 10 deletions

View file

@ -1,7 +1,7 @@
/**
* File: leetcode_two_sum.rs
* Created Time: 2023-01-14
* Author: xBLACICEx (xBLACKICEx@outlook.com )
* Author: xBLACICEx (xBLACKICEx@outlook.com)
*/
use std::collections::HashMap;

View file

@ -1,9 +1,9 @@
#![allow(unused_variables)]
/**
* File: space_complexity.cpp
* File: space_complexity.rs
* Created Time: 2023-01-13
* Author: xBLACICEx (xBLACKICEx@outlook.com )
* Author: xBLACICEx (xBLACKICEx@outlook.com)
*/
#[allow(unused_variables)]
use std::collections::HashMap;

View file

@ -1,9 +1,9 @@
#![allow(unused_variables)]
/**
* File: time_complexity.cpp
* File: time_complexity.rs
* Created Time: 2023-01-10
* Author: xBLACICEx (xBLACKICEx@outlook.com )
* Author: xBLACICEx (xBLACKICEx@outlook.com)
*/
#[allow(unused_variables)]
/* 常数阶 */
fn constant(n: i32) -> i32 {
@ -98,6 +98,7 @@ fn logarithmic(mut n: i32) -> i32 {
count
}
/* 对数阶(递归实现) */
fn log_recur(n: i32) -> i32 {
if n <= 1 {
return 0;

View file

@ -1,10 +1,10 @@
// rand = "0.8.5"
/**
* File: time_complexity.cpp
* File: time_complexity.rs
* Created Time: 2023-01-13
* Author: xBLACICEx (xBLACKICEx@outlook.com )
* Author: xBLACICEx (xBLACKICEx@outlook.com)
*/
// rand = "0.8.5"
// to compilse and run this singile file need:
// 1. cargo install cargo-single
// 2. cargo single run worst_best_time_complexity.rs