{"id":13468037,"url":"https://github.com/wangzheng0822/algo","last_synced_at":"2025-05-10T12:24:58.063Z","repository":{"id":37405992,"uuid":"150058902","full_name":"wangzheng0822/algo","owner":"wangzheng0822","description":"数据结构和算法必知必会的50个代码实现","archived":false,"fork":false,"pushed_at":"2024-08-21T07:31:34.000Z","size":1173,"stargazers_count":23064,"open_issues_count":157,"forks_count":7065,"subscribers_count":829,"default_branch":"master","last_synced_at":"2025-05-08T22:37:34.763Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wangzheng0822.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2018-09-24T05:33:46.000Z","updated_at":"2025-05-08T03:52:59.000Z","dependencies_parsed_at":"2022-07-12T23:00:30.511Z","dependency_job_id":"5685a1b8-2c54-46f9-974a-15426131fe80","html_url":"https://github.com/wangzheng0822/algo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangzheng0822%2Falgo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangzheng0822%2Falgo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangzheng0822%2Falgo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangzheng0822%2Falgo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wangzheng0822","download_url":"https://codeload.github.com/wangzheng0822/algo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253166473,"owners_count":21864467,"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","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-07-31T15:01:04.537Z","updated_at":"2025-05-10T12:24:58.026Z","avatar_url":"https://github.com/wangzheng0822.png","language":"Python","funding_links":[],"categories":["Misc","Python","[Python](#python)","Data Structures and Algorithms","Python (1887)","inbox","计算机编程 数据结构与算法","C/C++","基础/算法","tools"],"sub_categories":["PHP","网络服务_其他","3. Course and Code"],"readme":"# 数据结构和算法必知必会的50个代码实现\n### 微信搜索我的公众号“小争哥”，或者微信扫描下面二维码关注\n### 关注微信公众号，回复”PDF“获取独家算法资料。\n### 前Google工程师，10万人跟着学的《数据结构和算法之美》《设计模式之美》专栏作者\n![t2](https://github.com/wangzheng0822/markdownphotos/blob/master/pics/qrcode_for_gh_9b0e7afdff20_258.jpg)\n\n## 数组\n* 实现一个支持动态扩容的数组\n* 实现一个大小固定的有序数组，支持动态增删改操作\n* 实现两个有序数组合并为一个有序数组\n\n## 链表\n* 实现单链表、循环链表、双向链表，支持增删操作\n* 实现单链表反转\n* 实现两个有序的链表合并为一个有序链表\n* 实现求链表的中间结点\n\n## 栈\n* 用数组实现一个顺序栈\n* 用链表实现一个链式栈\n* 编程模拟实现一个浏览器的前进、后退功能\n\n## 队列\n* 用数组实现一个顺序队列\n* 用链表实现一个链式队列\n* 实现一个循环队列\n\n## 递归\n* 编程实现斐波那契数列求值f(n)=f(n-1)+f(n-2)\n* 编程实现求阶乘n!\n* 编程实现一组数据集合的全排列\n\n## 排序\n* 实现归并排序、快速排序、插入排序、冒泡排序、选择排序\n* 编程实现O(n)时间复杂度内找到一组数据的第K大元素\n\n## 二分查找\n* 实现一个有序数组的二分查找算法\n* 实现模糊二分查找算法（比如大于等于给定值的第一个元素）\n\n## 散列表\n* 实现一个基于链表法解决冲突问题的散列表\n* 实现一个LRU缓存淘汰算法\n\n## 字符串\n* 实现一个字符集，只包含a～z这26个英文字母的Trie树\n* 实现朴素的字符串匹配算法\n\n## 二叉树\n* 实现一个二叉查找树，并且支持插入、删除、查找操作\n* 实现查找二叉查找树中某个节点的后继、前驱节点\n* 实现二叉树前、中、后序以及按层遍历\n\n## 堆\n* 实现一个小顶堆、大顶堆、优先级队列\n* 实现堆排序\n* 利用优先级队列合并K个有序数组\n* 求一组动态数据集合的最大Top K\n\n## 图\n* 实现有向图、无向图、有权图、无权图的邻接矩阵和邻接表表示方法\n* 实现图的深度优先搜索、广度优先搜索\n* 实现Dijkstra算法、A*算法\n* 实现拓扑排序的Kahn算法、DFS算法\n\n## 回溯\n* 利用回溯算法求解八皇后问题\n* 利用回溯算法求解0-1背包问题\n\n## 分治\n* 利用分治算法求一组数据的逆序对个数\n\n## 动态规划\n* 0-1背包问题\n* 最小路径和\n* 编程实现莱文斯坦最短编辑距离\n* 编程实现查找两个字符串的最长公共子序列\n* 编程实现一个数据序列的最长递增子序列\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwangzheng0822%2Falgo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwangzheng0822%2Falgo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwangzheng0822%2Falgo/lists"}