|
1 | 1 | export const posts = [ |
2 | | - ['2024-10-12-intro-week-3-solutions', 'VProg Intro : Week 3, Binary Search - Solutions', '2024-10-12', 'Solutions to the homeworks from Week 3.', ['vprog-intro'], ['vprog-intro', 'binsearch', 'solutions']], |
3 | | - ['2024-10-11-intro-week-2-solutions', 'VProg Intro : Week 2, Two Pointers - Solutions', '2024-10-11', 'Solutions to the homeworks from Week 2.', ['vprog-intro'], ['vprog-intro', 'twoptr', 'solutions']], |
4 | | - ['2024-09-28-intro-week-3', 'VProg Intro : Week 3, Binary Search', '2024-09-28', 'Video is out for Week 3!', ['vprog-intro'], ['vprog-intro', 'binsearch', 'video']], |
5 | | - ['2024-09-20-intro-week-2', 'VProg Intro : Week 2, Two Pointers', '2024-09-20', 'Video is out for Week 2!', ['vprog-intro'], ['vprog-intro', 'twoptr', 'video']], |
6 | | - ['2024-09-20-intro-week-1-solutions', 'VProg Intro : Week 1, Introduction - Solutions', '2024-09-20', 'Solutions to the homeworks from Week 1.', ['vprog-intro'], ['vprog-intro', 'implementation', 'solutions']], |
7 | | - ['2024-09-09-vprog-start', 'VProg Intro : Week 1, Introduction + VProg Advanced Student Club', '2024-09-09', 'Autumn 2024, VProg Intro video', ['vprog', 'vprog-intro', 'starting', 'introduction'], ['vprog', 'vprog-intro', 'starting', 'introduction', 'video']], |
8 | | - ['2024-08-10-non-academic-problem', 'Non-academic problem (Bridge Finding)', '2024-08-10', 'Solving CF 1986F with bridge finding.', ['codeforces', 'graph-theory'], ['codeforces', 'dfs', 'graph-theory', 'trees']], |
9 | | - ['2024-04-03-pure-math', 'Competitive programming for pure mathematics', '2024-04-03', 'On 10 April!', ['vprog', 'pure-math', 'projects'], ['vprog', 'pure-math', 'projects']], |
10 | | - ['2024-03-08-house-robbery', 'House Robbery (learning dynamic programming)', '2024-03-08', 'Solving LeetCode 198: House Robbery.', ['leetcode', 'dynamic-programming'], ['leetcode', 'dp'], true], |
11 | | - ['2024-03-04-vprolog', 'VProlog', '2024-03-04', 'On 6 March!', ['vprog', 'vprolog'], ['vprog', 'vprolog']], |
12 | | - ['2024-02-16-vprog-start', 'VProg Student Club', '2024-02-16', 'Spring 2024', ['vprog', 'starting'], ['vprog', 'starting']], |
13 | | - ['2023-09-01-vprog-start', 'VProg Student Club', '2023-09-01', 'Fall 2023', ['vprog', 'starting'], ['vprog', 'starting']], |
14 | | - ['2023-02-26-vprog-start', 'VProg Student Club', '2023-02-26', 'Spring 2023', ['vprog', 'starting'], ['vprog', 'starting']], |
15 | | - ['2022-09-01-vprog-start', 'VProg Student Club', '2022-09-01', 'Fall 2022', ['vprog', 'starting'], ['vprog', 'starting']], |
16 | | - ['2022-04-12-wish-i-knew-how-to-sort', 'Wish I Knew How to Sort (an exercise in probability)', '2022-04-12', 'In this post I would like to talk about solving 1753C: Wish I Knew How to Sort on Codeforces.', ['codeforces', 'probability-theory'], ['codeforces', 'probability-theory', 'expectation-value', 'markov-chain']], |
17 | | - ['2021-04-16-google-code-jam-qualification-round', 'Google Code Jam 2021 - Qualification Round', '2021-04-16', 'The 2021 Google Code Jam Qualification Round took place a few weeks ago.', ['competitions'], ['google', 'codejam']] |
18 | | -].map(([slug, title, date, summary, categories, tags, hidden = false]) => ({ |
19 | | - slug, title, date, summary, categories, tags, hidden, url: `/posts/${slug}/` |
| 2 | + ['2024-10-12-intro-week-3-solutions', 'VProg Intro : Week 3, Binary Search - Solutions', '2024-10-12', 'Solutions to the homeworks from Week 3.'], |
| 3 | + ['2024-10-11-intro-week-2-solutions', 'VProg Intro : Week 2, Two Pointers - Solutions', '2024-10-11', 'Solutions to the homeworks from Week 2.'], |
| 4 | + ['2024-09-20-intro-week-1-solutions', 'VProg Intro : Week 1, Introduction - Solutions', '2024-09-20', 'Solutions to the homeworks from Week 1.'], |
| 5 | + ['2024-08-10-non-academic-problem', 'Non-academic problem (Bridge Finding)', '2024-08-10', 'Solving CF 1986F with bridge finding.'], |
| 6 | + ['2024-04-03-pure-math', 'Competitive programming for pure mathematics', '2024-04-03', 'On 10 April!'], |
| 7 | + ['2024-03-08-house-robbery', 'House Robbery (learning dynamic programming)', '2024-03-08', 'Solving LeetCode 198: House Robbery.', true], |
| 8 | + ['2024-03-04-vprolog', 'VProlog', '2024-03-04', 'On 6 March!'], |
| 9 | + ['2022-04-12-wish-i-knew-how-to-sort', 'Wish I Knew How to Sort (an exercise in probability)', '2022-04-12', 'In this post I would like to talk about solving 1753C: Wish I Knew How to Sort on Codeforces.'], |
| 10 | + ['2021-04-16-google-code-jam-qualification-round', 'Google Code Jam 2021 - Qualification Round', '2021-04-16', 'The 2021 Google Code Jam Qualification Round took place a few weeks ago.'] |
| 11 | +].map(([slug, title, date, summary, hidden = false]) => ({ |
| 12 | + slug, title, date, summary, hidden, url: `/posts/${slug}/` |
20 | 13 | })); |
21 | | - |
22 | | -export function groupPosts(field) { |
23 | | - const groups = new Map(); |
24 | | - for (const post of posts.filter((item) => !item.hidden)) { |
25 | | - for (const value of post[field]) { |
26 | | - const items = groups.get(value) ?? []; |
27 | | - items.push(post); |
28 | | - groups.set(value, items); |
29 | | - } |
30 | | - } |
31 | | - return [...groups.entries()].sort(([a], [b]) => a.localeCompare(b)); |
32 | | -} |
0 commit comments