All Projects → jinbooooom → coding-for-algorithms

jinbooooom / coding-for-algorithms

Licence: MIT license
数据结构,剑指offer,leetcode等OJ平台刷题记录(C++/Python/Java)

Programming Languages

python
139335 projects - #7 most used programming language
C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to coding-for-algorithms

iOS-Algorithm
iOS数据结构算法
Stars: ✭ 22 (+10%)
Mutual labels:  leetcode, offer
interview-leetcode
【📚 技术面试高频算法+真实面试各类问答+学习指南】助力快速复习找到工作,涵盖大部分程序员所需要掌握的核心知识。
Stars: ✭ 161 (+705%)
Mutual labels:  leetcode, offer
data-structures-and-algorithms
Important data structures and algorithms implemented in Java along with solutions to AlgoExpert problems and some Leetcode problems.
Stars: ✭ 222 (+1010%)
Mutual labels:  leetcode, algorithms-and-data-structures
CodingInterview
Leetcode解题、剑指offer第二版💪💪💪⛷😀
Stars: ✭ 28 (+40%)
Mutual labels:  leetcode, offer
Algorithm
「面试算法练级攻略」 - 「LeetCode题解」 - 「剑指offer题解」
Stars: ✭ 142 (+610%)
Mutual labels:  leetcode, offer
Competitive Programming
Contains solutions and codes to various online competitive programming challenges and some good problems. The links to the problem sets are specified at the beginning of each code.
Stars: ✭ 65 (+225%)
Mutual labels:  leetcode, algorithms-and-data-structures
algorithm-base
一位酷爱做饭的程序员,立志用动画将算法说的通俗易懂。我的面试网站 www.chengxuchu.com
Stars: ✭ 9,824 (+49020%)
Mutual labels:  leetcode, offer
Java
All Examples for learning Java programming and algorithms
Stars: ✭ 14 (-30%)
Mutual labels:  leetcode, algorithms-and-data-structures
Apachecn Algo Zh
ApacheCN 数据结构与算法译文集
Stars: ✭ 10,498 (+52390%)
Mutual labels:  leetcode, offer
Leetcode Go
✅ Solutions to LeetCode by Go, 100% test coverage, runtime beats 100% / LeetCode 题解
Stars: ✭ 22,440 (+112100%)
Mutual labels:  leetcode, algorithms-and-data-structures
LeetCode-Book
《剑指 Offer》 Python, Java, C++ 解题代码,LeetBook《图解算法数据结构》配套代码仓。
Stars: ✭ 1,164 (+5720%)
Mutual labels:  leetcode, algorithms-and-data-structures
Interview DS Algo
Super Repository for Coding Interview Preperation
Stars: ✭ 514 (+2470%)
Mutual labels:  leetcode, algorithms-and-data-structures
LearnCPP
Learn Cpp from Beginner to Advanced ✅ Practice 🎯 Code 💻 Repeat 🔁 One step solution for c++ beginners and cp enthusiasts.
Stars: ✭ 359 (+1695%)
Mutual labels:  leetcode, algorithms-and-data-structures
leetcode
题目可以用三位题号搜索到,如“001”。稍后会全部更新为四位题号。
Stars: ✭ 59 (+195%)
Mutual labels:  leetcode, algorithms-and-data-structures
FAANG-Coding-Interview-Questions
A curated List of Coding Questions Asked in FAANG Interviews
Stars: ✭ 1,195 (+5875%)
Mutual labels:  leetcode, algorithms-and-data-structures
LeetCode-Py
⛽️「算法通关手册」,超详细的「算法与数据结构」基础讲解教程,「LeetCode」650+ 道题目 Python 版的详细解析。通过「算法理论学习」和「编程实战练习」相结合的方式,从零基础到彻底掌握算法知识。
Stars: ✭ 881 (+4305%)
Mutual labels:  leetcode, algorithms-and-data-structures
LeetCode
200 LeetCode practice problems for beginners in algorithms and data structures
Stars: ✭ 120 (+500%)
Mutual labels:  leetcode, algorithms-and-data-structures
LogicStack-LeetCode
公众号「宫水三叶的刷题日记」刷穿 LeetCode 系列文章源码
Stars: ✭ 5,979 (+29795%)
Mutual labels:  leetcode, offer
OI-Template
Bill Yang's algorithm & data structure templates
Stars: ✭ 15 (-25%)
Mutual labels:  algorithms-and-data-structures
Coding-Practice
Coding practice, design pattern implementation in C++ and some knowledge summary.
Stars: ✭ 48 (+140%)
Mutual labels:  leetcode

通过刷题练习算法,包含两种语言 Python 和 C++ 的实现。其中题目描述在 Python 版本中。

如果在 C++ 版本没有看到解题思路,可以查看 Python 版本的解题思路。

简单函数实现

int2str str2int strcat strcmp strcpy memcpy strstr swapInt
swapStr strlen

常用排序算法

排序算法 平均 最好 最坏 空间复杂度 稳定性 实现 实现 适用的数据规模
直接插入 n^2 n n^2 1 稳定 Python C++
希尔排序 n^1.3 n n^2 1 不稳定 Python C++
直接选择 n^2 n^2 n^2 1 不稳定 Python C++
堆排序 nlog2n nlog2n nlog2n 1 不稳定 C++
冒泡排序 n^2 n n^2 1 稳定 Python C++
快速排序 nlog2n nlog2n n^2 nlog2n 不稳定 Python C++
归并排序 nlog2n nlog2n nlog2n n 稳定 Python C++

数据结构

数据结构 实现 实现
链表 Python C++
双向链表 Python C++
Python C++
队列 Python C++
双向队列 Python
循环队列 Python
二叉树 Python
二叉排序树 C++

栈与队列

题目 题目出处 实现 实现 知识点 难度
用两个栈实现队列 剑指-9 Python C++ 1
包含min函数的栈 剑指-30 Python C++ 1
栈的压入弹出序列 剑指-31 Python C++ 2

链表

题目 题目出处 实现 实现 知识点 难度
反向打印链表 剑指-6 Python C++ 1
删除链表的结点 剑指-18 Python C++ 1
删除链表的重复结点 剑指-18扩展 Python C++ 1
链表的中间节点 力扣-876 C++ 快慢指针 1
回文链表 力扣-234 C++ 快慢指针 2
链表中倒数第k个节点 剑指-22 Python C++ 快慢指针 2
链表中环的入口结点 剑指-23 Python C++ 3
反转链表 剑指-24 Python C++ 2
合并两个排序的链表 剑指-25 Python C++ 1
两数相加 力扣-2 Python C++ 1
两个列表的第一个公共结点 剑指-52 Python C++ 快慢指针 2
对链表进行插入排序 力扣-147 C++ 3

题目 题目出处 实现 实现 知识点 难度
重建二叉树 剑指-7 Python C++ 2
二叉树的下一个结点 剑指-8 Python 2
树的子结构 剑指-26 Python C++ 2
二叉树的镜像 剑指-27 Python C++ 1
对称二叉树 剑指-28 Python C++ 1
从上到下打印二叉树 剑指-32 Python C++ 1
把二叉树打印成多行 剑指-32扩展 Python C++ 2
按“之”字形打印二叉树 剑指-32扩展 Python C++ 2
二叉搜索树的后序遍历 剑指-33 Python 2
二叉树中和为某一值的路径 剑指-34 Python C++ 2
二叉搜索树与双向链表 剑指-36 Python 2
二叉搜索树的第k大节点 剑指-54 Python 树的遍历 2
二叉树的深度 剑指-55 Python 递归 1

图与回溯

题目 题目出处 实现 实现 知识点 难度
矩阵中的路径 剑指-12 Python 3
机器人的运动范围 剑指-13 Python C++ 2
岛屿数量 力扣-200 Python C++ DFS,BFS,并查集 4

数组与字符串

题目 题目出处 实现 实现 知识点 难度
字符串的全排列 剑指-38 Python C++ 2
顺时针打印矩阵 剑指-29 Python 2
替换空格 剑指-5 Python 1
两数之和 力扣-1 Python C++ 哈希 1
三数之和 力扣-15 Python C++ 双指针 2
两数之和之数组有序 剑指-57,力扣-167 Python 双指针 1
验证回文串 力扣-125 Python C++ 双指针 1
删除排序数组中的重复项 力扣-26 Python C++ 1
实现strStr 力扣-28 Python C++ 1
旋转图像 力扣-48 Python 1
加一 力扣-66 Python C++ 1
旋转数组 力扣-189 Python C++ 1
两个数组的交集 力扣-349 Python 1
两个数组的交集扩展 力扣-350 Python 1
字符串中的第一个唯一字符 力扣-387 Python C++ 哈希 1
判断子序列 力扣-392 Python C++ 1
反转单词顺序 剑指-58 Python 1
左旋转字符串 剑指58-扩展 Python 1
最长公共前缀 力扣-14 C++ 1
寻找峰值 力扣-162 C++ 二分 1
递增的三元子序列 力扣-334 C++ 2
跳跃游戏 力扣-55 Python C++ 2
根据身高重建队列 力扣-406 C++ 2

排序与搜索

题目 题目出处 实现 实现 知识点 难度
数组中重复的数字 剑指-3 Python C++
数组中重复的数字扩展 剑指3-扩展 Python
二维数组中的查找 剑指-4 Python C++
旋转数组的最小数字 剑指-11 Python
调整数组顺序使奇数在偶数前面 剑指-21 Python C++
数组中出现次数超过一半的数字 剑指-39 Python
最小的 k 个数 剑指-40 Python
搜索插入位置 力扣-35 Python C++ 二分 1
颜色排序 力扣-75 Python C++ 排序 2
摆动排序 力扣-324 Python C++ 排序 2

动态规划

【注】

子序列不要求连续,子串要求连续

题目 题目出处 实现 实现 知识点 难度
剪绳子 剑指-14 Python C++ 1
连续子数组的最大和 剑指-42 Python C++ 1
连续子数组的最大积 力扣-152 C++ 2
01背包无价值 领扣-92 Python C++ 1
01背包有价值 领扣-125 Python C++ 1
完全背包 领扣 Python C++ 1
01背包返回方案数 领扣-563 Python C++ 2
完全背包返回方案数 领扣-562 Python C++ 2
买卖股票的最佳时机 力扣-121 Python C++ 1
买卖股票的最佳时机2 力扣-122 Python C++ 1
买卖股票的最佳时机3 力扣-123 Python C++ 3
最长回文子串 力扣-5 Python C++ 3
最长回文子序列 力扣-516 C++ 2
不同路径 力扣-62 Python C++ 1
最小路径和 剑指-47,力扣-64 Python C++ 1
交错字符串 力扣-97 Python 4
打家劫舍 力扣-198 Python C++ 1
零钱兑换 力扣-322 Python C++ 完全背包变种 2
分割等和子集 力扣-416 Python C++ 01背包变种 2
一和零 力扣-474 Python C++ 多维01背包 3
目标和 力扣-494 Python C++ 01背包变种 3
无重复字符的最长子串 剑指-48,力扣-3 C++ 3
最长上升子序列 力扣-300 C++ 1
最长公共子串 力扣-1143 C++ 2

巧妙

题目 题目出处 实现 实现 知识点 难度
二进制中1的个数 剑指-15 Python C++ 位运算
汉明距离 力扣-461 位运算
数值的整数次方 剑指-16 Python C++ 递归
x的平方根 力扣-69 Python 二分
有效的完全平方数 力扣-367 Python
出现一次的数字 力扣-136 Python C++ 位运算
缺失数字 力扣-268 位运算
存在重复元素 力扣-217 Python C++
大数加法

其他

题目 题目出处 实现 实现 知识点 难度
青蛙跳台阶 剑指-10 Python C++ 数学 1
变态跳台阶 剑指-10扩展 Python C++ 数学 1
矩阵覆盖 剑指-10扩展 Python 数学 1
正则表达式匹配 剑指-19 Python C++ 3
表示数值的字符串 剑指-20 Python
把数组排列成最小的数 剑指-45 Python 3
有效数字 力扣-65 Python 有限状态机 3
移动零 力扣-283 Python
猜数字大小 力扣-374 Python
朋友圈 力扣-547 Python 并查集 3
丑数 剑指-49 Python C++ 1
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].