Assignment 11-E

1. From a given array (take user input of length 5) of alphabets, construct the shortest possible

palindrome, change the length of the initial array to store the resultant array.

2. Display a tringle of ‘*’ of a user input length, by constructing a triangular array (Example with

length 10 is displayed in the following figure).

3. Write a java method to find the dimension of an array. (define your own two-dimensional

array and then use that method to find the dimension of your defined array).

4. Define a random binary (0 & 1) array of size 20, sort it.

5. Write a method to find the third largest number in a user entered/input array of length 15,

display the result.

6. Write a method to find the average of an array after ignoring largest and smallest number in

a user entered array of length 15, display the result.

7. Write a method to check at the time of user input if given array follows the structure of one

positive and one negative entry (i.e. either all even numbers are positive and odd negative

or vice versa). Maximum length of array is 10.

8. Write a method to check if rearrangements of an array can form a given sequence after

rearranging.

(Test data: Input array = {2232415}, Given sequence= {4232125}

Output: yes).

9. Write a method to find the greatest consecutive natural numbers series in an array. (Test

data: Input array A: {32,22,55,23,24,56,43,67,25} then Output array B : {22,23,24,25}.)

10. Write a method to concatenate two given array of length 10, into a single array.

11. Write a method to find the subset array after removing any repetition in the given array of

length 15. (Test data: Input array A= {1,4,5,2,3,4,3,6,7,5,8,6,3,6,3} is the given array, output

array will be B: {1,4,5,2,3,6,7})

12. Write a method to display the diagonal elements of a pre-defined 2-D array.

13. Write a method to find the common element between two arrays taken from user input of a

fixed length 10.

14. Write a method to replace all the non-positive numbers to zero in a user entered array of

length 10.

15. In an array of integer find triplets those sum to zero. (Test data: Input array A= {1, -5,3, -8,11,

-6,23,10, -2,12}, Output: 2, {10,-8,-2}, {11,-6,-5})

ECSE102L

# Assignment 11-E 1. From a given array

Original price was: $35.00.$30.00Current price is: $30.00.

## Reviews

There are no reviews yet.