GithubHelp home page GithubHelp logo

leetcode's Introduction

Leetcode-Python(完善中...)

Python

说明

基础算法

No 题名 解决方法 类型 备注
#01 堆排序 Heap sort 排序
#02 Huffman 树 Huffman tree Lambda 函数
#03 归并排序 Merge sort 排序

《剑指 Offer》题目列表

1. 出现频率 为该题在真实面试中出现的相对频率,不代表真实频率;
2. 百分比越高说明在真实面试中出现频率越高
No 题名 解决方法 出现频率 备注
#19 正则表达式匹配 正则表达式匹配 60% 递归(低效❗️)
#23 链表中的环入口节点 链表中的环入口节点 35% 快慢指针
#24 反转链表 反转链表 86% 递归、栈、迭代
#25 合并两个排序链表 合并两个排序链表 63% 递归法、迭代法
#26 树的子结构 树的子结构 24% 递归法
#27 镜像二叉树 镜像二叉树 递归法
#28 对称二叉树 对称二叉树 32% 递归法、迭代法
#36 二叉搜索树与双向链表 二叉搜索树与双向链表 52% 递归法
#37 序列化二叉树 序列化二叉树 27% 递归法
#38 字符串的排列 字符串的排列 62% 递归法
#39 数组中出现次数
超过一半的数字
数组中出现次数
超过一半的数字
30% 迭代法
#40 最小的 k 个数 最小的 k 个数 47% 快速排序
(海量数据❗️)
#41 数据流中的中位数 数据流中的中位数 41% 堆排序(❗️)
#42 连续子数组的最大和 连续子数组的最大和 动态规划
#43 1~N 整数中 1 出现的次数 1~N 整数中 1 出现的次数 递归法
#44 数字序列中某一位的数字 数字序列中某一位的数字 迭代法
#45 把数组排成最小的数 把数组排成最小的数 -
#46 把数字翻译成字符串 把数字翻译成字符串 动态规划
#47 礼物的最大价值 礼物的最大价值 动态规划
#48 最长不含重复字符
的子字符串
最长不含重复字符
的子字符串
动态规划
#49 丑数 丑数 13%
#50 第一个只出现一次的字符 第一个只出现一次的字符
#51 数组中的逆序对 数组中的逆序对
#52 两个链表的第一个公共节点 两个链表的第一个公共节点 链表
#53 在排序数组中查找数字 在排序数组中查找数字 二分法
#54 二叉搜索树的第 K 大节点 二叉搜索树的第 K 大节点 二叉树

Leetcode 已解题目列表

1. 出现频率 为该题在真实面试中出现的相对频率,不代表真实频率;
2. 百分比越高说明在真实面试中出现频率越高
No 题名 解决方法 出现频率 难度 备注
#0003 无重复字符的最长子串 Longest substring
without-repeating-characters
🍊 动态规划
#0010 正则表达式匹配 Regular expression matching 60% 🍅 递归(低效❗️)
#0021 合并两个有序链表 Merge two sorted lists 63% 🍏 递归法、迭代法
#0034 在排序数组中查找元素
的第一个和最后一个位置
Find first and last position of element in sorted array 🍊 二分法
#0041 缺失的第一个正数 First missing positive 🍅 数组
#0046 全排列 Permutations 62% 🍊 递归法
#0053 最大子序和 Maximum subarray 🍏 动态规划
#0091 解码方法 Decode ways 🍊 动态规划
#0101 对称二叉树 Symmetric tree 32% 🍏 迭代法、递归法
#0160 相交链表 Intersection of two linked lists 🍏 链表
#0169 求众数 Majority element 30% 🍏 迭代法
#0179 最大数 Largest number 🍊
#0215 数组中的第 K 个最大元素 Kth largest element in an array 47% 🍊 快速排序
(海量数据❗️)
#0230 二叉搜索树中第 K 小的元素 Kth smallest element in a BST 🍊 二叉树
#0233 数字 1 的个数 Number of digit one 🍅
#0263 丑数 Ugly number 13% 🍏
#0264 丑数 II Ugly number II 18% 🍊
#0295 数据流的中位数 Find median from data stream 41% 🍅 堆排序(❗️)
#0297 二叉树的序列化与反序列化 Serialize and deserialize
binary tree
27% 🍅 递归法
#0387 字符串中的第一个唯一字符 First unique character
in a string
🍏
#0400 第 N 个数字 Nth digit 🍏
#0426 通过次数将二叉搜索树
转化为排序的双向链表
Convert binary search tree to
sorted doubly-linked-list
52% 🍊 递归法
#0442 数组中重复的数据 Find all duplicates in an array 🍊 数组
#0448 找到数组中所有消失的数字 Find-all-numbers-disappeared-in-an-array 🍏 数组
#0459 重复的子字符串 Repeated substring pattern 🍏
#0572 另一个树的子树 Subtree of another tree 24% 🍏 递归法
#0945 使数组唯一的最小增量 Minimum increment to make array unique
#0961 重复 N 次的元素 N-repeated element
in size-2n array
24% 🍏 迭代法,哈希表
#1137 第 N 个泰波那契数 N-th tribonacci number 🍏 动态规划

leetcode's People

Contributors

wuuw avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.