1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Maksim231197 [3]
3 years ago
15

palindrome is a string that reads the same forwards as backwards. Using only a xed number of stacks, and a xed number of int and

char variables, write an algorithm to determine if a string is a palindrome. Assume that the string is read from standard input one character at a time. The algorithm should output true or false as appropriate
Computers and Technology
1 answer:
bixtya [17]3 years ago
6 0

Solution :

check_palindrome$(string)$

   lower_$case$_string$=$ string$. to$_lower()

   Let stack = new Stack()

   Let queue = new Queue();

   for each character c in lower_case_string:

       stack.push(c);

       queue.enqueue(c);

   let isPalindrome = true;

   while queue is not empty {

       if (queue.remove().equals(stack.pop())) {

           continue;

       } else {

           isPalindrome=false;

           break while loop;

       }

   }

   return isPalindrome

Input = aabb

output = true

input =abcd

output = false

You might be interested in
Most hand sewing begins and ends with
Burka [1]
I would say it has to be b but its what the correct answer is its up to you!

I hoped this helped you out!

Have a nice day!

4 0
3 years ago
Select all statements that correctly describe the ramifications of important features supported by modern DBMS.
lara [203]

Answer:  

"Option b and Option d" is the correct option for this question.

Explanation:

In the database, datatype belongs to the information storage medium, which can hold a specific type of value. There are several data types, which is used in database like integer, character, series, floating-point and array numbers, and the rules, that give levels of security to information are known as a security constraints. It may be either developed as rules on integrity, mathematical formalism rules or schematic rules, and other choices were wrong which can be described as follows:

  • In option a, The asserts, which is in any exchange in a database, should only modify the information, that is effected in acceptable ways is called consistency, that's why it is wrong.
  • In option c, The validity and accuracy of the data in the database can not be ensured, that's why it is wrong.
3 0
3 years ago
With dhcp, a device borrows, or ____ an ip address while it is attached to the network.
mestny [16]

I guess the correct answer is leases.

With DHCP, a device borrows, or leases an IP address while it is attached to the network.

8 0
3 years ago
Oliver is creating an image of a fruit basket. From the basket, he wants the red apples to stand out among the rest so they will
Volgvan
He   can increase   the   thickness   of the paint on the   apples.
Or he can  use glossier  finish on the   apples  to make them stand out...
3 0
4 years ago
What is a table in excel
tekilochka [14]
A table in excel is responsible for keeping track of numerical data.

Meaning information in the form of numbers.
8 0
3 years ago
Read 2 more answers
Other questions:
  • All of the following statements correctly describe an advantage or disadvantage associated with the use of Monte Carlo Analysis
    9·1 answer
  • Laser printers are particularly effective for printing _______________.
    6·1 answer
  • 100 POINTS PLEASE HELP ASAP!!!!!
    5·2 answers
  • PLEASE PLEASE PLEASE PLEASE PLEASE HELP! I'M BEGGING Y'ALL! I NEED THIS FOR TODAY! CORRECT ANSWERS WILL BE AWARDED BRAINLIEST!
    6·1 answer
  • The Windows taskbar is generally found _____. at the top of the screen in the Start menu at the bottom of the screen at the righ
    14·2 answers
  • Which of the following is NOT a reason to include comments in programs
    10·2 answers
  • Means storing,accessing information over the internet other than hard drive and your system
    15·1 answer
  • Which discipline focuses on the design of computer hardware?
    5·2 answers
  • The scope of a temporary table is limited to what?
    10·1 answer
  • Posts that you delete
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!