Previous Next
0 / 23
Module DEMO-32-108DEMO-C-32

Is Palindrome

DEMO-C-32 โ€ข Programming in C

Browser-only practice

Problem Statement

Write a program that checks if a given string is a palindrome. A palindrome reads the same forwards and backwards. The check should be case-insensitive.

Constraints

Max string length: 100

Input Format

Input:

String S

Output Format

Output:

YES/NO

Sample Testcases

Submit runs every public testcase in this browser. Results and code never leave this device.

Sample #1
Public sample
stats
YES
stats is a palindrome.
Sample #2
Public sample
tenet
YES
tenet is a palindrome.
Sample #3
Public sample
sprint
NO
sprint is not a palindrome.
Sample #4
Public sample
fig
NO
fig is not a palindrome.

Web terminal

C, C++, Java, and Python run locally in a browser VM. No worker or visualizer is used.

Saved in this browser
Editor settings