Skip to content

Commit c320568

Browse files
committed
알고리즘 풀이 업데이트
1 parent aa73607 commit c320568

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

.DS_Store

0 Bytes
Binary file not shown.

.vscode/settings.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"liveServer.settings.port": 5501
3+
}

section3/1.회문문자열.html

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<html>
2+
<head>
3+
<meta charset="UTF-8" />
4+
<title>출력결과</title>
5+
</head>
6+
<body>
7+
<script>
8+
function solution(s) {
9+
let answer = 'NO';
10+
11+
const replacedString = s.toUpperCase();
12+
13+
const reversedString = replacedString.split('').reverse().join('');
14+
15+
if (replacedString === reversedString) {
16+
return 'YES';
17+
}
18+
return answer;
19+
}
20+
21+
let str = 'gooG';
22+
console.log(solution(str));
23+
</script>
24+
</body>
25+
</html>

0 commit comments

Comments
 (0)