Finding Reverse in java

Task - 
For this challenge, you will be given an integer and an array and you are asked to find the reverse of the number in the array. 


Input Format - 
you will be taking a number as an input from stdin which tells about the length of the array. On another line, array elements should be there with single space between them. Next line, there is an integer whose reverse need to be found. 

Output Format 
print 'True' if the reverse of the number is present in the array otherwise return 'False'. 





Sample Test Case: 
Sample Input:-6
78 92 44 63 71 97
29

Sample Output 
True 

Explanation: 
Given integer is 29 and the reverse of the number is 92 and it is present in the array. Hence, print 'True'.


Comments

Popular posts from this blog

Reasoning-Number Series

Reasoning-Letter Series

Multiply Negative numbers in java