Frequently used methods
A collection of functions frequently used when solving leetcode problems with Rust
std
Struct String in std::string module
push
push_str
and all the methods listed below in str
Struct Vec in std::vec module
push
pop
slice
insert
remove
splice
dedup
and all the methods listed below in slice
Primitive Type str
Primitive Type Slice
contains
concat
join
first
last
get
len
iter
iter_mut
split
rsplit
sort
sort_by
reverse
windows
to_vec
*into_vec
std::collections
Struct VecDeque
push_back
pop_back
back
back_mut
push_front
pop_front
front
front_mut
insert
get
remove
append
Struct HashMap
insert
get
keys
values
iter
len
Struct HashSet
insert
get
get_or_insert
remove
take
iter
len
std::iter
Trait Iterator
collect
collect_into
flatten
fold
map
max
max_by
min
min_by
nth
reduce && fold
rev
skip
take
zip