Please create a set containing the first 12 characters of your name (without space). If your name contains less than 12

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Please create a set containing the first 12 characters of your name (without space). If your name contains less than 12

Post by answerhappygod »

Please create a set containing the first 12 characters of your name (without space). If your name contains less than 12 characters, then repeat again from the beginning. For example: JOHNNY DEPP would become {‘J’,’O’,’H’,’N’,’N’,’Y’,’D’,’E’,’P’,’P’,’J’,’O’}. Now, answer the following questions. You can use C++ coding or simply a pseudo-code.
a. (5 points) Create a recursive function to print these 12 characters in reverse. Identify which is the base case and the general case.
b. (5 points) Use a stack to reverse these 12 characters.
c. (5 points) Use a queue to check if these 12 characters is a palindrome.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply