Given a Binary Search Tree and a target number, return true if there exist two elements in the BST such…
分类:LeetCode
[Leetcode] Wiggle Sort 摇摆排序
Wiggle Sort Given an unsorted array nums, reorder it in-place such that nums[0] <= nums[1] >= nums[2] &l…
[LeetCode][Python]448. Find All Numbers Disappeared in an Array
Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appea…
Leetcode - Substring with Concatenation of All Words
My code: public class Solution { public List<Integer> findSubstring(String s, String[] words) { List<…
[LeetCode By Go 59]541. Reverse String II
题目 Given a string and an integer k, you need to reverse the first k characters for every 2k characters countin…
[LeetCode] Binary Tree Level Order Traversal II 二叉树层序遍历之二
Given a binary tree, return the bottom-up level order traversal of its nodes’ values. (…
[LeetCode] Find Minimum in Rotated Sorted Array II 寻找旋转有序数组的最小值之二
Follow up for “Find Minimum in Rotated Sorted Array”:What if duplicates are allowed…
[LeetCode] Largest Palindrome Product 最大回文串乘积
Find the largest palindrome made from the product of two n-digit numbers. Since the result could be ver…
[LeetCode] Longest Palindromic Subsequence 最长回文子序列
Given a string s, find the longest palindromic subsequence’s length in s. You may assume that the…
LeetCode 273 Integer to English Words
题目描述 Convert a non-negative integer to its english words representation. Given input is guaranteed to be less …
[Leetcode] Remove Nth Node From End of List 移除倒数第N的节点
Remove Nth Node From End of List 最新更新的解法和思路:https://yanjia.me/zh/2018/11/… Given a linked list, remove t…
[Leetcode] Binary Search Tree Iterator 二叉搜素树迭代器
Binary Search Tree Iterator 最新更新:https://yanjia.me/zh/2019/02/… Implement an iterator over a binary sear…