随笔分类 -  C/C++

摘要:Unique Binary Search Trees 题解 原创文章,拒绝转载 题目来源:https://leetcode.com/problems/unique binary search trees/description/ Description Given n, how many struc 阅读全文
posted @ 2018-01-22 21:18 言何午 阅读(89) 评论(0) 推荐(0)
摘要:Binary Tree Inorder Traversal 题解 原创文章,拒绝转载 题目来源:https://leetcode.com/problems/binary tree inorder traversal/description/ Description Given a binary tr 阅读全文
posted @ 2018-01-22 20:07 言何午 阅读(160) 评论(0) 推荐(0)
摘要:Same Tree 题解 原创文章,拒绝转载 题目来源:https://leetcode.com/problems/same tree/description/ Description Given two binary trees, write a function to check if they 阅读全文
posted @ 2018-01-22 18:08 言何午 阅读(132) 评论(0) 推荐(0)
摘要:Median of Two Sorted Arrays 题解 题目来源:https://leetcode.com/problems/median of two sorted arrays/description/ Description There are two sorted arrays num 阅读全文
posted @ 2018-01-21 20:17 言何午 阅读(100) 评论(0) 推荐(0)
摘要:Longest Palindromic Substring 题解 原创文章,拒绝转载 题目来源:https://leetcode.com/problems/longest palindromic substring/description/ Description Given a string s, 阅读全文
posted @ 2018-01-20 19:47 言何午 阅读(107) 评论(0) 推荐(0)
摘要:归并排序 递归版 c++ include using namespace std; // reg 是临时存储归并结果的数组 void merge(int arr, int reg, int start, int end) { if (start = end) return; int left = s 阅读全文
posted @ 2018-01-13 13:10 言何午 阅读(206) 评论(0) 推荐(0)
摘要:Copy List with Random Pointer 题解 原创文章,拒绝转载 题目来源:https://leetcode.com/problems/copy list with random pointer/description/ Description A linked list is 阅读全文
posted @ 2017-12-27 17:58 言何午 阅读(108) 评论(0) 推荐(0)
摘要:Range Sum Query Mutable 题解 原创文章,拒绝转载 题目来源:https://leetcode.com/problems/range sum query mutable/description/ Description Given an integer array nums, 阅读全文
posted @ 2017-12-21 21:26 言何午 阅读(140) 评论(0) 推荐(0)
摘要:Insertion Sort List 题解 原创文章,拒绝转载 题目来源:https://leetcode.com/problems/insertion sort list/description/ Description Sort a linked list using insertion so 阅读全文
posted @ 2017-12-20 17:39 言何午 阅读(116) 评论(0) 推荐(0)
摘要:Populating Next Right Pointers in Each Node II 题解 原创文章,拒绝转载 题目来源:https://leetcode.com/problems/populating next right pointers in each node ii/descript 阅读全文
posted @ 2017-12-15 02:05 言何午 阅读(116) 评论(0) 推荐(0)
摘要:Populating Next Right Pointers in Each Node 题解 原创文章,拒绝转载 题目来源:https://leetcode.com/problems/populating next right pointers in each node/description/ D 阅读全文
posted @ 2017-12-15 02:04 言何午 阅读(96) 评论(0) 推荐(0)
摘要:Add Two Numbers 题解 原创文章,拒绝转载 题目来源:https://leetcode.com/problems/add two numbers/description/ Description You are given two non empty linked lists repr 阅读全文
posted @ 2017-12-13 17:12 言何午 阅读(114) 评论(0) 推荐(0)
摘要:Path Sum II 题解 原创文章,拒绝转载 题目来源:https://leetcode.com/problems/path sum ii/description/ Description Given a binary tree and a sum, find all root to leaf 阅读全文
posted @ 2017-12-06 22:23 言何午 阅读(111) 评论(0) 推荐(0)
摘要:Construct Binary Tree from Inorder and Postorder Traversal 题解 原创文章,拒绝转载 题目来源:https://leetcode.com/problems/construct binary tree from inorder and post 阅读全文
posted @ 2017-12-06 21:12 言何午 阅读(184) 评论(0) 推荐(0)
摘要:Maximum Binary Tree 题解 原创文章,拒绝转载 题目来源:https://leetcode.com/problems/maximum binary tree/description/ Description Given an integer array with no duplic 阅读全文
posted @ 2017-12-06 19:31 言何午 阅读(121) 评论(0) 推荐(0)
摘要:Search a 2D Matrix 题解 原创文章,拒绝转载 题目来源:https://leetcode.com/problems/search a 2d matrix/description/ Description Write an efficient algorithm that searc 阅读全文
posted @ 2017-12-02 10:30 言何午 阅读(115) 评论(0) 推荐(0)
摘要:Palindrome Partitioning 题解 原创文章,拒绝转载 题目来源:https://leetcode.com/problems/palindrome partitioning/description/ Description Given a string s, partition s 阅读全文
posted @ 2017-11-30 23:02 言何午 阅读(115) 评论(0) 推荐(0)
摘要:Unique Paths II 题解 原创文章,拒绝转载 题目来源:https://leetcode.com/problems/unique paths ii/description/ Description Follow up for "Unique Paths": Now consider if 阅读全文
posted @ 2017-11-23 21:17 言何午 阅读(93) 评论(0) 推荐(0)
摘要:Unique Paths 题解 原创文章,拒绝转载 题目来源:https://leetcode.com/problems/unique paths/description/ Description A robot is located at the top left corner of a m x 阅读全文
posted @ 2017-11-22 20:40 言何午 阅读(100) 评论(0) 推荐(0)
摘要:Kth Largest Element in an Array 题解 题目来源:https://leetcode.com/problems/kth largest element in an array/description/ Description Find the kth largest el 阅读全文
posted @ 2017-11-18 17:37 言何午 阅读(115) 评论(0) 推荐(0)