pub struct Solution;
Expand description
快慢指针
但 Rust 中对于一个值不能有两个 mut 的引用,所以可以裸指针。 因为在一个函数里操作,可以保证是安全的。
这里返回可以 Clone…
Implementations§
Auto Trait Implementations§
impl Freeze for Solution
impl RefUnwindSafe for Solution
impl Send for Solution
impl Sync for Solution
impl Unpin for Solution
impl UnwindSafe for Solution
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more