Scala programming project. Need to use some programming concepts such as minimum moves ,twin strings and subarray sum.
Consider an array with n elements and value of all the elements is zero. We can perform following operations on the array.
Incremental operations:Choose 1 element from the array and increment its value by 1.
Doubling operation: Double the values of all the elements of array.
9 pekerja bebas membida secara purata $449 untuk pekerjaan ini
Hello.I can write scala to perform the required operations.E.g val ar = Array(2,3,5,9) val ar1= ar map (_+1)//to increment val ar2= ar map (_*2) // doubling