题目 Write a function that takes a string as input and reverse only the vowels of a string. Example 1: Given s =…
分类:LeetCode
[LeetCode By Go 72]70. Climbing Stairs
题目 You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 …
[LeetCode By Go 13]637. Average of Levels in Binary Tree
题目 Given a non-empty binary tree, return the average value of the nodes on each level in the form of an array.…
[LeetCode By Go 26]606. Construct String from Binary Tree
题目 You need to construct a string consists of parenthesis and integers from a binary tree with the preorder tr…
[LeetCode By Go 25]389. Find the Difference
题目 Given two strings s and t which consist of only lowercase letters. String t is generated by random shufflin…
[LeetCode By Go 99]374. Guess Number Higher or Lower
题目 We are playing the Guess Game. The game is as follows: I pick a number from 1 to n. You have to guess which…
[LeetCode By Go 101]9. Palindrome Number
题目 Determine whether an integer is a palindrome. Do this without extra space. Some hints: Could negative integ…
[LeetCode By Go 24]653. Two Sum IV - Input is a BST
题目 Given a Binary Search Tree and a target number, return true if there exist two elements in the BST such tha…
[LeetCode By Go 61]108. Convert Sorted Array to Binary Search Tree
题目 Given an array where elements are sorted in ascending order, convert it to a height balanced BST. 解题思路 根据一个…
[LeetCode By Go 7]575. Distribute Candies
题目 原题链接 Given an integer array with even length, where different numbers in this array represent different kin…
LeetCode刷题之Next Permutation
Problem Implement next permutation, which rearranges numbers into the lexicographically next greater permutati…
LeetCode刷题之Count And Say
Problem The count-and-say sequence is the sequence of integers with the first five terms as following: 1. 1 2.…