Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Distributed Relational Database Architecture Connectivity Guide

Authors: Teresa Hopper

4th Edition

0133983064, 978-0133983067

More Books

Students also viewed these Databases questions

Question

What has been your desire for leadership in CVS Health?

Answered: 1 week ago

Question

Question 5) Let n = N and Y Answered: 1 week ago

Answered: 1 week ago