Di dieu aya conto kode Rust anu nyandak kapamilikan tina susunan wilangan bulat sareng nyortir aranjeunna dina urutan naék nganggo metode sort() ti kotak nyortir: nganggo std::cmp::Ordering; nganggo std::sort::{self, Sort}; fn sort_array(mut arr: Vec<i32>) -> Vec<i32> { arr.sort(); arr } fn main() { hayu mut arr = vec![3, 2, 1]; arr = sort_array((); arrln(! "Sorted array: {:?}", arr); }
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence