随笔分类 - C/C++
摘要:Unique Binary Search Trees 题解 原创文章,拒绝转载 题目来源:https://leetcode.com/problems/unique binary search trees/description/ Description Given n, how many struc
阅读全文
摘要:Binary Tree Inorder Traversal 题解 原创文章,拒绝转载 题目来源:https://leetcode.com/problems/binary tree inorder traversal/description/ Description Given a binary tr
阅读全文
摘要:Same Tree 题解 原创文章,拒绝转载 题目来源:https://leetcode.com/problems/same tree/description/ Description Given two binary trees, write a function to check if they
阅读全文
摘要:Median of Two Sorted Arrays 题解 题目来源:https://leetcode.com/problems/median of two sorted arrays/description/ Description There are two sorted arrays num
阅读全文
摘要:Longest Palindromic Substring 题解 原创文章,拒绝转载 题目来源:https://leetcode.com/problems/longest palindromic substring/description/ Description Given a string s,
阅读全文
摘要:归并排序 递归版 c++ include using namespace std; // reg 是临时存储归并结果的数组 void merge(int arr, int reg, int start, int end) { if (start = end) return; int left = s
阅读全文
摘要:Copy List with Random Pointer 题解 原创文章,拒绝转载 题目来源:https://leetcode.com/problems/copy list with random pointer/description/ Description A linked list is
阅读全文
摘要:Range Sum Query Mutable 题解 原创文章,拒绝转载 题目来源:https://leetcode.com/problems/range sum query mutable/description/ Description Given an integer array nums,
阅读全文
摘要:Insertion Sort List 题解 原创文章,拒绝转载 题目来源:https://leetcode.com/problems/insertion sort list/description/ Description Sort a linked list using insertion so
阅读全文
摘要:Populating Next Right Pointers in Each Node II 题解 原创文章,拒绝转载 题目来源:https://leetcode.com/problems/populating next right pointers in each node ii/descript
阅读全文
摘要:Populating Next Right Pointers in Each Node 题解 原创文章,拒绝转载 题目来源:https://leetcode.com/problems/populating next right pointers in each node/description/ D
阅读全文
摘要:Add Two Numbers 题解 原创文章,拒绝转载 题目来源:https://leetcode.com/problems/add two numbers/description/ Description You are given two non empty linked lists repr
阅读全文
摘要:Path Sum II 题解 原创文章,拒绝转载 题目来源:https://leetcode.com/problems/path sum ii/description/ Description Given a binary tree and a sum, find all root to leaf
阅读全文
摘要:Construct Binary Tree from Inorder and Postorder Traversal 题解 原创文章,拒绝转载 题目来源:https://leetcode.com/problems/construct binary tree from inorder and post
阅读全文
摘要:Maximum Binary Tree 题解 原创文章,拒绝转载 题目来源:https://leetcode.com/problems/maximum binary tree/description/ Description Given an integer array with no duplic
阅读全文
摘要:Search a 2D Matrix 题解 原创文章,拒绝转载 题目来源:https://leetcode.com/problems/search a 2d matrix/description/ Description Write an efficient algorithm that searc
阅读全文
摘要:Palindrome Partitioning 题解 原创文章,拒绝转载 题目来源:https://leetcode.com/problems/palindrome partitioning/description/ Description Given a string s, partition s
阅读全文
摘要:Unique Paths II 题解 原创文章,拒绝转载 题目来源:https://leetcode.com/problems/unique paths ii/description/ Description Follow up for "Unique Paths": Now consider if
阅读全文
摘要:Unique Paths 题解 原创文章,拒绝转载 题目来源:https://leetcode.com/problems/unique paths/description/ Description A robot is located at the top left corner of a m x
阅读全文
摘要:Kth Largest Element in an Array 题解 题目来源:https://leetcode.com/problems/kth largest element in an array/description/ Description Find the kth largest el
阅读全文

浙公网安备 33010602011771号