链接:https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/description/ 难度:Med…
分类:LeetCode
[LeetCode][String][Recursive] 267. Palindrome Permutation II
Problem More LeetCode Discussions Given a string s, return all the palindromic permutations (without duplicate…
Swift LeetCode 系列之 19: Remove Nth Node From End of List
https://leetcode.com/problems/remove-nth-node-from-end-of-list/description/ 利用快慢指针快速定位到要删除节点的位置 /** * Definiti…
LeetCode算法题-Min Stack(Java实现)
这是悦乐书的第177次更新,第179篇原创 01 看题和准备 今天介绍的是LeetCode算法题中Easy级别的第36题(顺位题号是155)。设计一个支持push,pop,top和在恒定时间内检索最小元素的堆栈。 pus…
populating-next-right-pointers-in-each-node
描述: Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; } P…
[LeetCode By Go 41]563. Binary Tree Tilt
题目 Given a binary tree, return the tilt of the whole tree. The tilt of a tree node is defined as the absolute …
[LeetCode] Design HashSet 设计HashSet
Design a HashSet without using any built-in hash table libraries. To be specific, your design shou…
LeetCode | Reverse Words in a String
题目: Given an input string, reverse the string word by word. For example, Given s = “the sky is blue̶…
LeetCode 119 Pascal's Triangle II
题目描述 Given an index k, return the kth row of the Pascal’s triangle. For example, given k = 3, Return [1,3,3,1]…
Connecting Graph II
Given n nodes in a graph labeled from1 to `n. There is no edges in the graph at beginning. You need to support…
186. Reverse Words in a String II
/* * 186. Reverse Words in a String II Total Accepted: 14384 Total Submissions: 49577 Difficulty: Medium Given…
[LeetCode] Plus One 加一运算
Given a non-negative number represented as an array of digits, plus one to the number. The digits are stored s…