Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn reverse(forward: &[u8]) -> Vec<u8> {
- forward.iter().cloned().rev().collect()
- }
- fn main () {
- let input = [0, 1, 2, 3];
- let expected_output = [3, 2, 1, 0];
- assert_eq!(&reverse(&input), &expected_output)
- }
Add Comment
Please, Sign In to add comment