摘要:https://oj.leetcode.com/problems/intersection-of-two-linked-lists/Write a program to find the node at which the intersection of two singly linked list...
阅读全文
随笔分类 - LeetCode
摘要:https://oj.leetcode.com/problems/flatten-binary-tree-to-linked-list/ Given a binary tree, flatten it to a linked list in-place. For example,Given The
阅读全文
摘要:https://oj.leetcode.com/problems/reverse-linked-list-ii/Reverse a linked list from positionmton. Do it in-place and in one-pass.For example:Given1->2-...
阅读全文
摘要:https://oj.leetcode.com/problems/reorder-list/ Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→… You must do this i
阅读全文
摘要:https://oj.leetcode.com/problems/remove-duplicates-from-sorted-list-ii/ Given a sorted linked list, delete all nodes that have duplicate numbers, leav
阅读全文
摘要:https://oj.leetcode.com/problems/convert-sorted-list-to-binary-search-tree/Given a singly linked list where elements are sorted in ascending order, co...
阅读全文
摘要:https://oj.leetcode.com/problems/symmetric-tree/Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For exam...
阅读全文
摘要:https://oj.leetcode.com/problems/valid-sudoku/Determine if a Sudoku is valid, according to:Sudoku Puzzles - The Rules.The Sudoku board could be partia...
阅读全文
摘要:https://oj.leetcode.com/problems/path-sum-ii/ Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum. F
阅读全文
摘要:https://oj.leetcode.com/problems/path-sum/ Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the va
阅读全文
摘要:https://oj.leetcode.com/problems/validate-binary-search-tree/Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is ...
阅读全文
摘要:https://oj.leetcode.com/problems/binary-tree-level-order-traversal-ii/Given a binary tree, return thebottom-up level ordertraversal of its nodes' valu...
阅读全文
摘要:https://oj.leetcode.com/problems/binary-tree-level-order-traversal/Given a binary tree, return thelevel ordertraversal of its nodes' values. (ie, from...
阅读全文
摘要:https://oj.leetcode.com/problems/binary-search-tree-iterator/Implement an iterator over a binary search tree (BST). Your iterator will be initialized ...
阅读全文
摘要:https://oj.leetcode.com/problems/anagrams/Given an array of strings, return all groups of strings that are anagrams.Note: All inputs will be in lower-...
阅读全文
摘要:https://oj.leetcode.com/problems/add-binary/ Given two binary strings, return their sum (also a binary string). For example,a = "11"b = "1"Return "100
阅读全文
摘要:https://oj.leetcode.com/problems/balanced-binary-tree/Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced bina...
阅读全文
摘要:https://oj.leetcode.com/problems/minimum-depth-of-binary-tree/Given a binary tree, find its minimum depth.The minimum depth is the number of nodes alo...
阅读全文
摘要:https://oj.leetcode.com/problems/reverse-nodes-in-k-group/ Given a linked list, reverse the nodes of a linked list k at a time and return its modified
阅读全文
摘要:https://oj.leetcode.com/problems/merge-k-sorted-lists/Mergeksorted linked lists and return it as one sorted list. Analyze and describe its complexity....
阅读全文

浙公网安备 33010602011771号