Solution to LeetCode Problem Set
Here is my collection of solutions to leetcode problems.
Related code can be found in this repo: https://github.com/zhuli19901106/leetcode
LeetCode - Reverse Linked List
LeetCode - Remove Linked List Elements
LeetCode - Bitwise AND of Numbers Range
LeetCode - Binary Tree Right Side View
LeetCode - Best Time to Buy and Sell Stock IV
LeetCode - Repeated DNA Sequences
LeetCode - Binary Search Tree Iterator
LeetCode - Factorial Trailing Zeroes
LeetCode - Excel Sheet Column Number
LeetCode - Excel Sheet Column Title
LeetCode - Fraction to Recurring Decimal
LeetCode - Compare Version Numbers
LeetCode - Intersection of Two Linked Lists
LeetCode - Find Minimum in Rotated Sorted Array II
LeetCode - Find Minimum in Rotated Sorted Array
LeetCode - Reverse Words in a String
LeetCode - Regular Expression Matching
LeetCode - Substring with Concatenation of All Words
LeetCode - Reverse Nodes in k-Group
LeetCode - Palindrome Partitioning II
LeetCode - Palindrome Partitioning
LeetCode - Minimum Window Substring
LeetCode - Max Points on a Line
LeetCode - Largest Rectangle in Histogram
LeetCode - Interleaving String
LeetCode - Evaluate Reverse Polish Notation
LeetCode - Longest Valid Parentheses
LeetCode - Flatten Binary Tree to Linked List
LeetCode - Convert Sorted List to Binary Search Tree
LeetCode - Binary Tree Maximum Path Sum
LeetCode - Trapping Rain Water
LeetCode - Unique Binary Search Trees II
LeetCode - String to Integer (atoi)
LeetCode - Longest Palindromic Substring
LeetCode - Permutation Sequence
LeetCode - First Missing Positive
LeetCode - Distinct Subsequences
LeetCode - Container With Most Water
LeetCode - Insertion Sort List
LeetCode - Binary Tree Postorder Traversal
LeetCode - Binary Tree Preorder Traversal
LeetCode - Linked List Cycle II
LeetCode - Copy List with Random Pointer
LeetCode - Sum Root to Leaf Numbers
LeetCode - Longest Consecutive Sequence
LeetCode - Best Time to Buy and Sell Stock III
LeetCode - Best Time to Buy and Sell Stock II
LeetCode - Best Time to Buy and Sell Stock
LeetCode - Pascal's Triangle II
LeetCode - Populating Next Right Pointers in Each Node II
LeetCode - Populating Next Right Pointers in Each Node
LeetCode - Minimum Depth of Binary Tree
LeetCode - Balanced Binary Tree
LeetCode - Convert Sorted Array to Binary Search Tree
LeetCode - Binary Tree Level Order Traversal II
LeetCode - Construct Binary Tree from Inorder and Postorder Traversal
LeetCode - Construct Binary Tree from Preorder and Inorder Traversal
LeetCode - Maximum Depth of Binary Tree
LeetCode - Binary Tree Zigzag Level Order Traversal
LeetCode - Binary Tree Level Order Traversal
LeetCode - Recover Binary Search Tree
LeetCode - Validate Binary Search Tree
LeetCode - Unique Binary Search Trees
LeetCode - Binary Tree Inorder Traversal
LeetCode - Restore IP Addresses
LeetCode - Reverse Linked List II
LeetCode - Remove Duplicates from Sorted List II
LeetCode - Remove Duplicates from Sorted List
LeetCode - Search in Rotated Sorted Array II
LeetCode - Remove Duplicates from Sorted Array II
LeetCode - Merge Two Sorted Lists
LeetCode - Length of Last Word
LeetCode - Search Insert Position
LeetCode - Search in Rotated Sorted Array
LeetCode - Divide Two Integers
LeetCode - Remove Duplicates from Sorted Array
LeetCode - Swap Nodes in Pairs
LeetCode - Merge k Sorted Lists
LeetCode - Generate Parentheses
LeetCode - Remove Nth Node From End of List
LeetCode - Letter Combinations of a Phone Number
LeetCode - Longest Common Prefix
LeetCode - Longest Substring Without Repeating Characters
LeetCode - Median of Two Sorted Arrays
Solution to LeetCode Problem Set的更多相关文章
- LeetCode Problem 90. Subsets II
python solution 123456789101112131415161718192021222324252627 class (object): def subsetsWithDup(sel ...
- an optimal solution to the problem
http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/Greedy/greedyIntro.htm Greedy Introdu ...
- leetcode problem 42 -- Trapping Rain Water
Given n non-negative integers representing an elevation map where the width of each bar is 1, comput ...
- leetcode problem (5) Longest Palindromic Substring
最长回文子串: 1. 暴力搜索 时间复杂度O(n^3) 2. 动态规划 dp[i][j] 表示子串s[i…j]是否是回文 初始化:dp[i][i] = true (0 <= i <= ...
- leetcode problem (2-4)
Problem 2 --- Add Two Numbers 简单的模拟题. Problem 3 --- Longest Substring Without Repeating Characters 题 ...
- LeetCode Problem 2:Two Sum
描述: Given an array of integers, find two numbers such that they add up to a specific target number. ...
- LeetCode Problem 9:Palindrome Number回文数
描述:Determine whether an integer is a palindrome. Do this without extra space. Some hints: Could nega ...
- LeetCode Problem 169: Majority Element查找多数元素
描述:Given an array of size n, find the majority element. The majority element is the element that app ...
- 【436】Solution for LeetCode Problems
Coding everyday. ^_^ 1. Two Sum 重点知识:指针可以存储数值,通过 malloc 新建数组 int* returnSize:Size of the return arra ...
随机推荐
- next_permutation,POJ(1256)
题目链接:http://poj.org/problem?id=1256 解题报告: 1.sort函数是按照ASC11码排序,而这里是按照 'A'<'a'<'B'<'b'<... ...
- 设置IE浏览器的默认下载路径
实现效果: 知识运用: Default Download Directory键 实现代码: private void button2_Click(object sender, EventArgs e) ...
- Ubuntu 16.04 源码方式安装 JDK
1.去官网下载JDK http://www.oracle.com/technetwork/articles/javase/index-jsp-138363.html 2.下载完成后,创建一个我们将要安 ...
- 【luogu P3372 线段树1】 模板
线段树的模板题 题目链接:https://www.luogu.org/problemnew/show/P3372 update区间修改,query区间求和 #include <iostream& ...
- iOS之性能的优化
本文转自:http://m.blog.csdn.net/article/details?id=51638925 写在前面 本文来自iOS Tutorial Team 的 Marcelo Fabri,他 ...
- iOS之UIImagePickerController显示中文界面
iOS开发中,我们经常遇到获取拍照.相册中图片的功能,就必然少不了UIImagePickerController,但是我们发现当我们使用它的时候,它的页面是英文的,看着很别扭,国人还是比较喜欢看中文界 ...
- DB2 SQL Error: SQLCODE = -798, SQLSTATE = 428C9
DB2 SQL Error: SQLCODE = -798, SQLSTATE = 428C9报错是因为 , 你往设置了ALWAYS自增的列里面插了初始值 . ALWAYS自增设置如下. -- 设置主 ...
- #leetcode刷题之路29- 两数相除
给定两个整数,被除数 dividend 和除数 divisor.将两数相除,要求不使用乘法.除法和 mod 运算符.返回被除数 dividend 除以除数 divisor 得到的商. 示例 1:输入: ...
- poj_2084_Game of Connections
This is a small but ancient game. You are supposed to write down the numbers 1, 2, 3, . . . , 2n - 1 ...
- 使用Python对MySQL数据库操作
本文介绍Python3使用PyMySQL连接数据库,并实现简单的增删改查. 什么是PyMySQL? PyMySQL是Python3.x版本中用于连接MySQL服务器的一个库,Python2.x中则使用 ...