Practice
Palindrome String
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.
Example:
"A man, a plan, a canal: Panama"
is a palindrome.
"race a car"
is not a palindrome.
Return 0 / 1
( 0 for false, 1 for true ) for this problem
1 | public class Solution { |
Amazing Subarrays
You are given a string S, and you have to find all the amazing substrings of S.
Amazing Substring is one that starts with a vowel (a, e, i, o, u, A, E, I, O, U).
Input
1 | Only argument given is string S. |
Output
1 | Return a single integer X mod 10003, here X is number of Amazing Substrings in given string. |
Constraints
1 | 1 <= length(S) <= 1e6 |
Example
1 | Input |
1 | public class Solution { |
Minimum Characters required to make a String Palindromic
You are given a string. The only operation allowed is to insert characters in the beginning of the string. How many minimum characters are needed to be inserted to make the string a palindrome string
Example:
Input: ABC
Output: 2
Input: AACECAAAA
Output: 2
1 | public class Solution { |