Error
|
|
---|---|
@Ibrahim Nash | 6379 |
@blackshadows | 6329 |
@mb1973 | 5376 |
@Quandray | 5231 |
@akhayrutdinov | 5111 |
@saiujwal13083 | 4510 |
@sanjay05 | 3762 |
@marius_valentin_dragoi | 3522 |
@sushant_a | 3459 |
@verma_ji | 3357 |
@KshamaGupta | 3318 |
Complete Leaderboard | |
|
|
@184025 | 112 |
@terabaap123 | 99 |
@arshjit_singh7 | 92 |
@anamikaprasad124 | 92 |
@kumsachin10 | 90 |
@vaibhavinayak | 75 |
@TanmayJ | 74 |
@NullPointerException | 74 |
@ronaldo77 | 72 |
@SamratAkkaladevi | 69 |
@ritiksethi21 | 68 |
Complete Leaderboard |
Given a string S, check if it is palindrome or not.
Example 1:
Input: S = "abba"
Output: 1
Explanation: S is a palindrome
Example 2:
Input: S = "abc"
Output: 0
Explanation: S is not a palindrome
Your Task:
You don't need to read input or print anything. Complete the function isPlaindrome() which accepts string S and returns a boolean value
Expected Time Complexity: O(Length of S)
Expected Auxiliary Space: O(1)
Constraints:
1 <= Length of S <= 105
We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?
Yes