Bu yerda Rust kodining misoli keltirilgan, u butun sonlar qatorini o'z ichiga oladi va sort qatoriga kiruvchi tartibda ularni sort () usuli yordamida saralaydi: std::cmp::Ordering; std::sort::{self, Sort}; fn sort_array(mut arr: Vec<i32>) -> Vec<i32> { arr.sort(); arr } fn main ((() { let mut arr = vec![3, 2, 1]; arr = sort_array(arr); print!(ln"Sorted array: {:?}", arr); }
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence