MCPcopy
hub / github.com/MisterBooo/LeetCodeAnimation / renderProblemIndex

Function renderProblemIndex

tools/scripts/sync-algomooc-index.js:132–150  ·  view source on GitHub ↗
(items)

Source from the content-addressed store, hash-verified

130}
131
132function renderProblemIndex(items) {
133 const rows = items.map((item) => {
134 const repoCell = item.repoPath ? `[\`${item.repoPath}\`](${encodeURI(`../${item.repoPath}`)})` : "";
135 return `| ${item.leetcodeId} | ${item.titleZh} | ${difficultyZh(item.difficulty)} | ${item.categoryZh} | [${item.slug}](${item.siteUrl}) | ${repoCell} |`;
136 });
137
138 return `# LeetCode 动画索引
139
140本文件由 \`tools/scripts/sync-algomooc-index.js\` 生成,数据来源为网站侧 \`study_index.js\`。
141
142- LeetCode 题数:${items.length}
143- 数据文件:[\`docs/data/manifest.json\`](data/manifest.json)
144- 按专题查看:[\`docs/index-by-topic.md\`](index-by-topic.md)
145
146| # | 题目 | 难度 | 分类 | 网站路径 | 仓库目录 |
147| :-- | :-- | :-- | :-- | :-- | :-- |
148${rows.join("\n")}
149`;
150}
151
152function renderTopicIndex(items) {
153 const groups = new Map();

Callers 1

Calls 1

difficultyZhFunction · 0.85

Tested by

no test coverage detected