Question: 1. Write a Scala function named shift_left that takes an array Int argument and returns an array in which all the elements are left
1. Write a Scala function named "shift_left" that takes an array Int argument and returns an array in which all the elements are left shifted by one place. For example, [2, 4, 5] left-shifted will be [4, 5, 2]. Write a main function to test your program. 2. Write a Scala function named "unique_str" that takes a string argument, removes all the characters that appeared more than once, and returns a string of unique characters. For example, "abbaac" returns "c" and "cbaaz" returns "cbz". Write a main function to test your program.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
