Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. (a) Coding: Write a a (C++/Java) code that checks if a number is Palindrome (use recursive function as you code). A palindrome number is
1. (a) Coding: Write a a (C++/Java) code that checks if a number is Palindrome (use recursive function as you code). A palindrome number is a number that reads the same from beginning to end and from end to beginning, in other words, a palindrome number remains the same when its digits are reversed. For example, 13431 is a palindrome number. 2332 is another one. (Note: Your program should receive an integer number as the input and always work with integer types, i.e., you cannot use string or char types throughout your code.) (b) test cases: You need to run your code for the following test cases and show the result obtained by the program. A screenshot of each run should be added to your solution. 1) O (output: yes) 2) 1234554321 (output: yes) 3) 123454321 (output: yes) 4) 1221 (output: yes) 5) 1234 (output: no) 6) 7676 (output: no) 7) -121 (output: yes 8) -456 (output: no) pints 2. What is the time complexity of your algorithm in question 1? Cleary justify your answer. Explain enough
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started