LeetCode in action
(1) Linked List:
- 2-add-two-numbers,2.cpp
- 19-remove-nth-node-from-end-of-list,TBD
- 21-merge-two-sorted-lists,TBD
- 83-remove-duplicates-from-sorted-list,83.cpp
- 141-linked-list-cycle,141.cpp,题解:判断单链表里面有没有环
- 160-intersection-of-two-linked-lists,160.cpp
- 203-remove-linked-list-elements,203.cpp
- 206-reverse-linked-list,206.cpp
- 234-palindrome-linked-list,234.cpp,题解:Palindrome Linked List 回文链表 和 如何判断一个单向链表是否为回文链表(Palindrome Linked List)
(2) Array/Vector:
- 27-remove-element,27.cpp,参考:vector初始化
- 41-first-missing-positive,TBD
- 48-rotate-image,48.cpp
- 54-spiral-matrix,54.cpp,参考:C++ vector用法
- 59-spiral-matrix-ii,59.cpp,参考:动态创建二维vector数组 C和C++ 及指针与引用的区别、vector动态创建数组
- 88-merge-sorted-array,88.cpp
(3) Stack:
- 20-valid-parentheses,20.cpp
- 71-simplify-path,TBD
- 150-evaluate-reverse-polish-notation,150.cpp,参考:C++中int型与string型互相转换
- 496-next-greater-element-i,496.cpp
- 844-backspace-string-compare,844.cpp,参考:C++ 将 std::string 转换为 char*
(4) Tree:
- 94-binary-tree-inorder-traversal,94.cpp,参考:二叉树的非递归遍历
- 98-validate-binary-search-tree,98.cpp
- 100-same-tree,100.cpp
- 101-symmetric-tree,101.cpp
- 102-binary-tree-level-order-traversal,102.cpp,参考:vector的reserve和resize
- 103-binary-tree-zigzag-level-order-traversal,103.cpp
- 104-maximum-depth-of-binary-tree,104.cpp,参考:vector反转reverse
- 105-construct-binary-tree-from-preorder-and-inorder-traversal,105.cpp,参考:STL里Vector的assign()函数用法,已知前序(后序)遍历序列和中序遍历序列构建二叉树(Leetcode相关题目)
- 106-construct-binary-tree-from-inorder-and-postorder-traversal,106.cpp
- 107-binary-tree-level-order-traversal-ii,107.cpp
- 112-path-sum,112.cpp
- 113-path-sum-ii,113.cpp
- 144-binary-tree-preorder-traversal,144.cpp
- 145-binary-tree-postorder-traversal,145.cpp
- 437-path-sum-iii,437.cpp
- 513-find-bottom-left-tree-value,513.cpp
- 515-find-largest-value-in-each-tree-row,515.cpp
- 617-merge-two-binary-trees,617.cpp
(5) String:
- 28-implement-strstr,28.cpp
- 58-length-of-last-word,58.cpp
- 67-add-binary,67.cpp
- 125-valid-palindrome,125.cpp
- 344-reverse-string,344.cpp
- 345-reverse-vowels-of-a-string,345.cpp
- 387-first-unique-character-in-a-string,387.cpp
- 434-number-of-segments-in-a-string,434.cpp
- 459-repeated-substring-pattern,459.cpp
- 520-detect-capital,520.cpp
- 680-valid-palindrome-ii,680.cpp,参考:LeetCode上遇到Runtime Error错误、Valid Palindrome II 验证回文字符串之二
- 709-to-lower-case,709.cpp
- 819-most-common-word,819.cpp
(6) Sorting:
- 56-merge-intervals,56.cpp,参考:解决Line 26: invalid use of non-static member function,how-to-sort-an-stl-vector
- 57-insert-interval,57.cpp
- 75-sort-colors,75.cpp
- 147-insertion-sort-list,147.cpp
- 179-largest-number,179.cpp,参考:Easiest way to convert int to string in C++、Largest Number
- 242-valid-anagram,242.cpp,参考:C++中map的用法
- 349-intersection-of-two-arrays,349.cpp,参考:C++中set的用法
LeetCode in action的更多相关文章
- 第21月第4天 leetcode codinginterview c++
1.leetcode Implement strStr(). Returns the index of the first occurrence of needle in haystack, or - ...
- shell of leetcode
1.Tenth Line How would you print just the 10th line of a file? For example, assume that file.txt has ...
- LeetCode——Anagrams
Given an array of strings, return all groups of strings that are anagrams. Note: All inputs will be ...
- leetcode 新题型----SQL,shell,system design
leetcode 主要是一个针对北美的coder人群找工作的代码练习网站,我在2015年初次接触这个网站的时候,总共只有200多道题目,是一个类似acm 的a题网站.这些年变化越来越大,主要是因为找工 ...
- [LeetCode] 229. Majority Element II 多数元素 II
Given an integer array of size n, find all elements that appear more than ⌊ n/3 ⌋ times. Note: The a ...
- 决战Leetcode: easy part(1-50)
本博客是个人原创的针对leetcode上的problem的解法,所有solution都基本通过了leetcode的官方Judging,个别未通过的例外情况会在相应部分作特别说明. 欢迎互相交流! em ...
- 一个方便 LeetCode 复习的脚本
这个脚本半年前就在用了,只不过一直没有公开. 这是一个简易的 LeetCode 自动统计程序, 可自动统计最近提交通过的题目, 并以 Markdown 的形式展示相关的数据. 采用 GitHub Ac ...
- TypeScript & LeetCode
TypeScript & LeetCode TypeScript In Action TypeScript 复杂类型 编写复杂的 TypeScript 类型 // 方法「只可能」有两种类型签名 ...
- redux-amrc:用更少的代码发起异步 action
很多人说 Redux 代码多,开发效率低.其实 Redux 是可以灵活使用以及拓展的,经过充分定制的 Redux 其实写不了几行代码.今天先介绍一个很好用的 Redux 拓展-- redux-amrc ...
随机推荐
- php 字符串截取,支持中文和其他编码
function.php //使用方法 $content= mb_substr($content,0,25,'utf-8'); /** * 字符串截取,支持中文和其他编码 * @static * @a ...
- LCA || BZOJ 1602: [Usaco2008 Oct]牧场行走 || Luogu P2912 [USACO08OCT]牧场散步Pasture Walking
题面:[USACO08OCT]牧场散步Pasture Walking 题解:LCA模版题 代码: #include<cstdio> #include<cstring> #inc ...
- Spring Boot事务管理(下)
在上两篇 Spring Boot事务管理(上)和Spring Boot事务管理(中)的基础上介绍注解@Transactional. 5 @Transactional属性 属性 类型 描述 value ...
- 16.3-uC/OS-III同步 (事件标志组实验)
事件标志组,顾名思义,就是若干个事件标志的组合,代表若干个事件是否发生,通常用于集合两个或两个以上事件的状态 . 1.如果想要使用事件标志组,就必须事先使能事件标志组.消息队列的使能位于“os_cfg ...
- Android字符串判断是否包含中文
// 判断一个字符是否是中文 public boolean isChinese(char c) { return c >= 0x4E00 && c <= 0x9FA5;// ...
- Number 强制类型转换 int 强制转换整型 float 强制转换浮点型 complex 强制转换成复数 bool 强制转换成布尔类型,结果只有两种,要么True 要么 False """bool 可以转换所有的数据类型 everything"""
# ###Number 强制类型转换 var1 = 5 var2 = 4.85 var3 = True var3_2 = False var4 = 3+9j var5 = "888777&q ...
- phpstorm 破解版
原链接https://blog.csdn.net/gu_wen_jie/article/details/79136475
- MD5在线加密的应用
MD5是message-digest algorithm 5(信息-摘要算法)的缩写.被广泛用于加密和解密技术上,是文件的“数字指纹”.可以对用户的密码进行加密操作,是不可逆的,所以用户输入的密码经过 ...
- 从零开始一起学习SLAM | 理解图优化,一步步带你看懂g2o代码
首发于公众号:计算机视觉life 旗下知识星球「从零开始学习SLAM」 这可能是最清晰讲解g2o代码框架的文章 理解图优化,一步步带你看懂g2o框架 小白:师兄师兄,最近我在看SLAM的优化算法,有种 ...
- c#XML转换成实体
首选:我的XML文件如下(mysql表里导出的):几千条,就选2条做例子. <?xml version="1.0" encoding="utf-8" ?& ...