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
777dan777 [17]
3 years ago
14

A palindrome is a string that is the same regardless of whether your read it forward or backward, assuming you ignore the spaces

and punctuations. For instance, the string "race car" is a palindrome. So is "a man a plan a canal panama" . Describe how you could use a stack to determine whether a string is palindrome. Trace your algorith for the string "deanaed"
Computers and Technology
1 answer:
pashok25 [27]3 years ago
6 0

Answer:

The explanation for this question is describes in the explanation section below.

Explanation:

A palindrome is a number, string, expression or certain character pattern that appears the very same backward as a forward.

Below is an algorithm for the series:

Step 1: Creates an object of generic stack-type of string set.

Step 2: Accept the sequence from those in the user as its entry.

Step 3: Throughout the specified set, disregard the white space.

Step 4: Build an object for the reverse string to be stored.

Step 5: To store the stack into the string, place the object that has come into the stack.

Step 6: Test whether the reversed string equals the initial string.

Step 7: Display the message of success.

Step 8: Display the message of failure when the strings aren't the same.

You might be interested in
In a switch statement, if a break statement is missing, _______________. Select one: a. the default case is automatically execut
Aleks [24]

Answer:

c. execution falls through the next branch until a break statement is reached

Explanation:

In a switch statement, if break is missing, then program continues to the next cases until it finds a break statement.

Consider the following example!

Example:

#include <iostream>

using namespace std;

int main()

{

  int choice = 1;

  switch (choice)

  {

      case 1:

      printf("This is case 1, No break\n");

      case 2:

      printf("This is case 2, No break\n");

      case 3:

      printf("This is case 3, with break\n");

      break;

      default: printf("Error! wrong choice\n");

  }

  return 0;

}

Output:

This is case 1, No break

This is case 2, No break

This is case 3, with break

We have 3 cases here and case 1 and 2 don't have break statements, only case 3 has a break statement.

We called the case 1, then program continued to case 2,  and finally to case 3 where it finds the break statement and terminates.

Therefore, we conclude that in a switch statement, if a break statement is missing, then execution falls through the next branch until a break statement is found.

8 0
3 years ago
Given that a function receives three parameters a, b, c, of type double, write some code, to be included as part of the function
never [62]

Answer:

Following are the code in the C Programming Language.

if(a==0) //set if conditional statement

{

//print the following message

printf("no solution for a=0");

}

Explanation:

Here, we define a function and pass three double data type variable i.e., "a", "b", "c" and then we write the following code inside the function.

  • Set the if conditional statement and check that condition is the variable "a" is equal to 0.
  • Then print message through the "printf()" which display on the screen if the given condition is true.
3 0
3 years ago
Match the description to the step in troubleshooting.
Digiron [165]
It should go 4 5 3 2 1
5 0
3 years ago
Write a function call it isEvenPositiveInt which takes an integer x and return true if x is positive and also even. Note isinsta
Anna11 [10]

Answer:

The program to this question as follows:

Program:

def isEvenPositiveInt(x): #defining method isEvenPositiveInt

   if x>0: #checking number is positive or not

       if x%2==0: #check true condition

           return True #return value True

       else:

           return False #return value False

   return False #return value False

print(isEvenPositiveInt(24)) #calling method and print return value

print(isEvenPositiveInt(-24)) #calling method and print return value

print(isEvenPositiveInt(23)) #calling method and print return value

Output:

True

False

False

Explanation:

In the above Python program, a method "isEvenPositiveInt" is defined, that accepts a variable "x" as its parameter, inside the method a conditional statement is used, which can be described as follows:

  • In the if block the condition "x>0" is passed, that check value is positive, if this condition is true, it will go to another if block.
  • In another, if block is defined, that checks the inserted value is even or not, if the value is even it will return "true", otherwise it will go to the else part, that returns "false".  
5 0
3 years ago
The ______________________ denotes the application software and technology that concerns a wide range of topics from the data ma
zhuklara [117]

Answer:

System/application Domain.

Explanation:

System/application domain represents the technology and  software that is tasked to do diverse subjects from the data management to the systems that processes data or information.

Particular application domain has it's own specific virtual address in which the resources for the application domain are present that uses the address space.

8 0
3 years ago
Other questions:
  • Which is an advantage the electronic scheduling tools have over paper calenders?​
    11·1 answer
  • Which would be a responsible use of technology used by victims of cyberbullying?
    12·2 answers
  • Which of the following data recording procedures is best used for behaviors that have a clear ending and beginning, do not occur
    12·1 answer
  • Settings to control the amount of notifications is a
    10·2 answers
  • Which of the following defines guidelines that specify the way computers access the medium to which they are attached, the type(
    8·1 answer
  • Suppose that a disk drive has 5,000 cylinders, numbered 0 to 4,999. The drive is currently serving a request at cylinder 2,050,
    14·1 answer
  • Write a program that prompts the user to enter the area of the flat cardboard. The program then outputs the length and width of
    15·1 answer
  • Explain the following buttons as used in emails:compose,inbox and Draft.<br>​
    10·1 answer
  • 2. How much did John Jones have in his account on the first day of the
    5·1 answer
  • Which example illustrates the idea of "collecting data"?
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!