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
. the web is based on the ________ protocol
elena55 [62]
The standard (and default) port for HTTP<span> servers to listen on is 80, though they can use any port. </span>HTTP<span> is based on the </span>TCP/IP protocols<span>, and is used commonly on the Internet for transmitting web-pages from servers to browsers.</span>
3 0
3 years ago
Create one of these on your desktop start menu and use it to quickly open a folder, data file, program, or other object?
mario62 [17]
<span>A shortcut is a used to quickly open a folder, data file, program, or other object. They are very convenient to have and make navigating through a computer extremely easy.</span>
3 0
3 years ago
When using Microsoft word, what would happen to the text of a paragraph if the "Justify" option is used?
Bond [772]
Hello, and thank you for asking your question!

When you click on the 'Justify' option on any type of word pad, it'll make all lines of words perfectly aligned. Here is a quick few-sentence example I made. 
(Photo)

Hope this helps! ☺♥

3 0
3 years ago
How did Matt Pyke and Karsten Schmidt create the advertisement for Audi? Multiple choice question. Filmed the car as wind tossed
saw5 [17]

Matt Pyke and Karsten Schmidt wrote a programming code that created the video which they used for the advertisement for Audi. Thus, Option D is the correct statement.

<h3>What is a programming code?</h3>

Programming code refers back to the set of instructions, or a system of rules, written in a specific programming language (i.e., the source code).

It is likewise the term used for the source code after it's been processed with the aid of using a compiler and made ready to run on the computer (i.e., the object code).

Therefore, Matt Pyke and Karsten Schmidt wrote a programming code that created the video which they used for the advertisement for Audi. Option D is the correct statement.

Learn more about programming code:

brainly.com/question/25770844

#SPJ1

8 0
2 years ago
To test for the current date in a query, type ____ in the criteria row of the appropriate column.
lyudmila [28]

Answer:

zxc

Explanation:

zc

6 0
3 years ago
Other questions:
  • What does the acronym GIF stand for? Graphics Interface Format Graphics Interchange Format Going Into Files Gathering Informatio
    12·2 answers
  • How can i complain a rude comment
    7·1 answer
  • Which Tab contains the font style attributes?<br><br> Home<br> Insert<br> Review<br> View
    8·2 answers
  • Create the tables and appropriate constraints based on the following ER diagram. Use appropriate data types. Note that the size
    7·1 answer
  • Thomas has signed a deal with a production house that allows them to use his images on their website. What is required when imag
    5·2 answers
  • Which of the following is a possible disadvantage of recursion? Question 10 options: Recursive solutions can be less efficient t
    8·1 answer
  • What are the five generations of computers?​
    13·1 answer
  • What is a file path?
    7·1 answer
  • Jackie is planning a surprise birthday party for her best friend and is researching a location to have the party. Jackie found a
    6·1 answer
  • If String str = "Computer Science";, then what is the value of str.substring(10);? ​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!