/// Rotate array to the right by k steps using repeated single shifts.
///
/// Takes a list reference as input and returns a `Vec<i32>` or a corresponding error.
///
/// # Examples
///
/// Basic usage:
/// ```
/// let result = algorithmz::array::rotate(&[1,1,2,3,3,4,5,5,9],3).unwrap();
/// assert_eq!(result,vec![5, 5, 9, 1, 1, 2, 3, 3, 4]);
/// ```
///
/// Match example:
/// ```
/// use algorithmz::array::rotate;
/// match rotate(&[1,1,2,3,3,4,5,5,9],3) {
/// Ok(n) => println!("The result was: {:?}",n),
/// Err(e) => eprintln!("The error was: {}",e),
/// }
/// ```