Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3675340
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T02:57:51+00:00 2026-05-19T02:57:51+00:00

In this problem we consider only strings of lower-case English letters (a-z). A string

  • 0

In this problem we consider only strings of lower-case English letters (a-z).

A string is a palindrome if it has exactly the same sequence of characters when traversed left-to-right as right-to-left. For example, the following strings are palindromes:

“kayak”

“codilitytilidoc”

“neveroddoreven”

A string A is an anagram of a string B if it consists of exactly the same characters, but possibly in another order. For example, the following strings are each other’s anagrams:

A=”mary” B=”army” A=”rocketboys” B=”octobersky” A=”codility” B=”codility”

Write a function

int isAnagramOfPalindrome(String S);

which returns 1 if the string s is a anagram of some palindrome, or returns 0 otherwise.

For example your function should return 1 for the argument “dooernedeevrvn”, because it is an anagram of a palindrome “neveroddoreven”. For argument “aabcba”, your function should return 0.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T02:57:51+00:00Added an answer on May 19, 2026 at 2:57 am

    ‘Algorithm’ would be too big word for it.

    You can construct a palindrome from the given character set if each character occurs in that set even number of times (with possible exception of one character).
    For any other set, you can easily show that no palindrome exists.

    Proof is simple in both cases, but let me know if that wasn’t clear.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Consider this problem: I have a program which should fetch (let's say) 100 records
This problem has been solved thanks to your suggestions. See the bottom for details.
This problem has been kicking my butt for a few days now. I have
This problem crops up every now and then at work. Our build machine can
This problem occurred during daylight saving time change. After the change occurred, we've noticed
This problem involved me not knowing enough of C++. I am trying to access
This problem pertains to Java By using RandomAccessFile I intend to be able to
I'm getting this problem: PHP Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable
I come across this problem when i am writing an event handler in SharePoint.
I have seen this problem arise in many different circumstances and would like to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.