Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

java quest 1.) checkPalindrome: Please write the function boolean checkPalindrome(String str)to test if a given string is palindrome or not. (Note: please consider alphabet character

java

quest 1.) checkPalindrome: Please write the function boolean checkPalindrome(String str)to test if a given string is palindrome or not. (Note: please consider alphabet character only and case insensitive.)

Example 1: Input: ab,B* a; Return: True Example 2: Input: bcbe; Return False

quest 2: checkAnagram: Please write a function boolean checkAnagram (String str1, String str2) to check if str1 is an anagram of str2. (Note: an anagram is a word or a phrase made by transposing the letters of another word or phrase. Please consider alphabet character only and case insensitive.)

Example 1: Input: (parliament, partial men); Return: True Example 2: Input: (hello, hell god); Return False

quest 3: reverseStringInWord: Please fill the function String reverseStringInWord(String str) to return a string which reverse the input word by word. (Note: the words are separated by one more whitespace.)

Example 1: Input: (I am good); Return: good am I Example 2: Input: (How are you) Return you are How

quest 4: MagicString: Please fill the function boolean magicString(String str) to check if a string str is a magic string. A magic String is the one which can be constructed by repeating the substring of it. (Note: you can assume all the characters are in lowercase).

Example 1: Input: abcabcabc Return: True Example 2: Input: ababc Return False

quest 5: ReverseStringInGroup: Please fill the function String reverseInGroup(String str, int k) to reverse the given string in group with size as k.

Example 1: Input: str = abcdef, k = 2 Return: badcfe Example 2: Input: str = abcdef, k = 4 Return dcbafe

quest 6: checkCapital: Please fill the function boolean checkCapital(String str) to check if the given string if a Capital String. A String is called a Capital String only if one of the following conditions is satisfied: a) All the characters in the String are capitals b) Only the first character is capital and the string has more than characters.

Example 1: Input: str = Computer Return: True Example 2: Input: str = GOOD Return True Example 3: Input: str = AmericA Return False

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

how to prepare a penetration test

Answered: 1 week ago