-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjava_palindrome.json
More file actions
38 lines (38 loc) · 1.13 KB
/
java_palindrome.json
File metadata and controls
38 lines (38 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{
"id": "java_palindrome",
"language": "java",
"title": "Valid Palindrome",
"description": "Check if a string is a valid palindrome. Ignore spaces, punctuation, and case.\n\nA palindrome reads the same forwards and backwards.\n\nExamples:\n- \"racecar\" -> true\n- \"hello\" -> false \n- \"A man a plan a canal Panama\" -> true (ignoring spaces and case)",
"starter_code": "public class Solution {\n public static boolean isPalindrome(String s) {\n // your code here\n return false;\n }\n}",
"entry_point": "Solution.isPalindrome",
"public_tests": [
{
"input": ["racecar"],
"expected_output": true,
"description": "simple palindrome"
},
{
"input": ["hello"],
"expected_output": false,
"description": "not a palindrome"
}
],
"hidden_tests": [
{
"input": ["A man a plan a canal Panama"],
"expected_output": true
},
{
"input": ["race a car"],
"expected_output": false
},
{
"input": ["Was it a car or a cat I saw"],
"expected_output": true
}
],
"limits": {
"time_seconds": 5,
"memory_mb": 256
}
}