Java program to interchange the first and last row of given matrix, here in this code Interchange function is used for swapping and then we get the desired matrix.
We have to give string as an input and check it is palindrome or not i.e. original string and reverse of that string should be same.
We have to take out repeated numbers from the array i.e. the required array should be sorted and if the array have same same value then delete that and just keep one value in Java.