Skip to content

Commit 073e67a

Browse files
sounmindclaude
andcommitted
refactor: read blindCategories from problem-categories.json
DaleStudy/leetcode-study#2559 ์—์„œ `problem-categories.json` ์˜ ๊ฐ ๋ฌธ์ œ์— `blindCategories` ํ•„๋“œ๋ฅผ ์ถ”๊ฐ€ํ•œ ๋’ค, Worker ๋Š” ์ด ํ•„๋“œ๋ฅผ ์ง์ ‘ ์ฝ๋Š”๋‹ค. - utils/blindCategories.js ์‚ญ์ œ (๋งคํ•‘ ํ…Œ์ด๋ธ”์ด ์›๋ณธ JSON ์œผ๋กœ ์ด์ „) - BLIND_CATEGORY_ORDER ๋Š” handlers/learning-status.js ๋‚ด๋ถ€ ์ƒ์ˆ˜๋กœ ์œ ์ง€ (๋™๋ฅ  ์ •๋ ฌ์˜ ํƒ€์ด๋ธŒ๋ ˆ์ด์ปค๋กœ๋งŒ ์‚ฌ์šฉ) ๋จธ์ง€ ์ˆœ์„œ: leetcode-study#2559 ๋จผ์ €, ๊ทธ ๋‹ค์Œ ์ด PR. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 633dadc commit 073e67a

2 files changed

Lines changed: 18 additions & 144 deletions

File tree

โ€Žhandlers/learning-status.jsโ€Ž

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,29 @@ import {
1515
formatLearningStatusComment,
1616
upsertLearningStatusComment,
1717
} from "../utils/learningComment.js";
18-
import {
19-
BLIND_CATEGORY_ORDER,
20-
getBlindCategories,
21-
} from "../utils/blindCategories.js";
2218

2319
const MAX_FILE_SIZE = 15000; // 15K ๋ฌธ์ž ์ œํ•œ (OpenAI ํ† ํฐ ์•ˆ์ „์žฅ์น˜)
2420

21+
// Blind Top 75 ํ๋ ˆ์ด์…˜ ์ˆœ์„œ โ€” ๋™๋ฅ  ์ •๋ ฌ์˜ ํƒ€์ด๋ธŒ๋ ˆ์ด์ปค๋กœ ์‚ฌ์šฉ.
22+
// ์ถœ์ฒ˜: https://www.teamblind.com/post/new-year-gift-curated-list-of-top-75-leetcode-questions-to-save-your-time-oam1oreu
23+
const BLIND_CATEGORY_ORDER = [
24+
"Array",
25+
"Binary",
26+
"Dynamic Programming",
27+
"Graph",
28+
"Interval",
29+
"Linked List",
30+
"Matrix",
31+
"String",
32+
"Tree",
33+
"Heap",
34+
];
35+
2536
/**
2637
* Blind Top 75 ์นดํ…Œ๊ณ ๋ฆฌ๋ณ„๋กœ ๋ˆ„์  ํ’€์ด ์ง„ํ–‰๋„๋ฅผ ๊ณ„์‚ฐํ•œ๋‹ค.
2738
*
28-
* `problem-categories.json` ์˜ LeetCode ์„ธ๋ถ€ ์นดํ…Œ๊ณ ๋ฆฌ(20+๊ฐœ) ๋Œ€์‹ 
29-
* Blind 10 ์นดํ…Œ๊ณ ๋ฆฌ๋งŒ ํ‘œ๋กœ ๋…ธ์ถœํ•œ๋‹ค (์ด์Šˆ #34).
39+
* `problem-categories.json` ์˜ ๊ฐ ๋ฌธ์ œ์— ํฌํ•จ๋œ `blindCategories` ํ•„๋“œ๋ฅผ
40+
* ๊ธฐ์ค€์œผ๋กœ Blind 10๊ฐœ ์นดํ…Œ๊ณ ๋ฆฌ๋งŒ ์ง‘๊ณ„ํ•œ๋‹ค (์ด์Šˆ #34).
3041
*
3142
* @param {object} categories - problem-categories.json ์ „์ฒด ์˜ค๋ธŒ์ ํŠธ
3243
* @param {string[]} solvedProblems - ์‚ฌ์šฉ์ž๊ฐ€ ํ’€์ดํ•œ ๋ฌธ์ œ ์ด๋ฆ„ ๋ฐฐ์—ด
@@ -42,8 +53,7 @@ function buildCategoryProgress(categories, solvedProblems) {
4253
);
4354

4455
for (const [problemName, info] of Object.entries(categories)) {
45-
const blindCategories = getBlindCategories(problemName);
46-
for (const cat of blindCategories) {
56+
for (const cat of info.blindCategories) {
4757
const entry = categoryMap.get(cat);
4858
if (!entry) continue;
4959
entry.total++;

โ€Žutils/blindCategories.jsโ€Ž

Lines changed: 0 additions & 136 deletions
This file was deleted.

0 commit comments

Comments
ย (0)