Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUST

how to make a sorting algorithim rust

fn sort(array: &mut Vec<i32>) {
  for i in 0..array.len() {
    for j in 0..array.len() - i - 1 {
      if array[j + 1] < array[j] {
        array.swap(j, j + 1);
      }
    }
  }
}
Source by www.kirillvasiltsov.com #
 
PREVIOUS NEXT
Tagged: #sorting #algorithim #rust
ADD COMMENT
Topic
Name
9+8 =