{"id":16498357,"url":"https://github.com/geekskai/leetcode","last_synced_at":"2025-08-12T23:07:57.336Z","repository":{"id":46391856,"uuid":"213030559","full_name":"geekskai/leetcode","owner":"geekskai","description":"算法","archived":false,"fork":false,"pushed_at":"2023-07-31T12:25:20.000Z","size":477,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-08T13:21:52.664Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/geekskai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-05T16:14:07.000Z","updated_at":"2024-01-12T03:19:22.000Z","dependencies_parsed_at":"2025-02-13T00:32:43.527Z","dependency_job_id":"b5dfdc0a-3989-4f13-9e6f-057a80f85dd4","html_url":"https://github.com/geekskai/leetcode","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/geekskai/leetcode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geekskai%2Fleetcode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geekskai%2Fleetcode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geekskai%2Fleetcode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geekskai%2Fleetcode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geekskai","download_url":"https://codeload.github.com/geekskai/leetcode/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geekskai%2Fleetcode/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270149345,"owners_count":24535728,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T14:48:12.987Z","updated_at":"2025-08-12T23:07:57.302Z","avatar_url":"https://github.com/geekskai.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## 动态规划\n\n### 动态规划题目的特点：\n\n1. 计数：\n   - 有多少种方式走到右下角\n   - 有多少种方法选出 K 个数使得和是 sum\n2. 求最大最小值\n   - 从左下角到右下角路径的最大数字之和\n   - 最长上升子序列长度\n3. 求存在性\n   - 取石子游戏，先手是否必胜\n   - 能不能选出 K 个数使得和是 sum\n\n### 动态规划组成一：确定状态\n\n- 状态在动态规划中属于定海神针\n- 简单来说，解动态规划的时候需要开一个数组，确定数组中的每个元素 f[i]或者 f[i][j]需要代表什么，类似于解数学题中的 x，y，z。\n- 确定状态需要 2 个意识：分别是最后一步和子问题\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeekskai%2Fleetcode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeekskai%2Fleetcode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeekskai%2Fleetcode/lists"}