We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b6dc68 commit 63d4698Copy full SHA for 63d4698
level-2/[3차]-압축&17684&.js
@@ -35,34 +35,7 @@ function solution(msg) {
35
// 정답 2 - ssi02014
36
function solution(msg) {
37
const result = [];
38
- const dict = [
39
- "A",
40
- "B",
41
- "C",
42
- "D",
43
- "E",
44
- "F",
45
- "G",
46
- "H",
47
- "I",
48
- "J",
49
- "K",
50
- "L",
51
- "M",
52
- "N",
53
- "O",
54
- "P",
55
- "Q",
56
- "R",
57
- "S",
58
- "T",
59
- "U",
60
- "V",
61
- "W",
62
- "X",
63
- "Y",
64
- "Z",
65
- ];
+ const dict = Array.from({length: 26},(_, i) => String.fromCharCode(65 + i))
66
67
// 시간 복잡도 O(N^2)
68
const lastWordAndCompression = msg.split("").reduce((acc, cur) => {
0 commit comments