Skip to content

Commit 5dcaf0e

Browse files
committed
Update README.md
1 parent 8ccd930 commit 5dcaf0e

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

README.md

+1-10
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,4 @@ Problem 1.
77

88
Given a string of alphabets, determine whether a palindrome can be formed by rearranging the letters of the string.
99

10-
For example, the string ‘abaab’ can be rearranged as ‘ababa’ to form a palindrome whereas the string ‘acccaa’ cannot be rearranged to form a palindome,
11-
12-
The program’s logic as explained in the club meeting is as follows:
13-
14-
1) Find the number of occurrences of each character in the word.
15-
16-
2) If there are more than two characters with an odd number of occurrences, a palindrome cannot be formed by shuffling the elements.
17-
18-
3) If there are no elements with an odd number of occurrence or if there is only one element with an odd number of occurrence, then a palindrome can be formed.
19-
10+
For example, the string ‘abaab’ can be rearranged as ‘ababa’ to form a palindrome whereas the string ‘acccaa’ cannot be rearranged to form a palindome.

0 commit comments

Comments
 (0)