【LEETCODE】40、1051. Height Checker】的更多相关文章

package y2019.Algorithm.array; /** * @ProjectName: cutter-point * @Package: y2019.Algorithm.array * @ClassName: HeightChecker * @Author: xiaof * @Description: 1051. Height Checker * Students are asked to stand in non-decreasing order of heights for a…
题目等级:Easy 题目描述: Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward. Example 1: Input: 121 Output: true Example 2: Input: -121 Output: false Explanation: From left to right, it reads -12…
题目等级:4Sum II(Medium) 题目描述: Given four lists A, B, C, D of integer values, compute how many tuples (i, j, k, l) there are such that A[i] + B[j] + C[k] + D[l] is zero. To make problem a bit easier, all A, B, C, D have same length of N where 0 ≤ N ≤ 500…
题目等级:4Sum(Medium) 题目描述: Given an array nums of n integers and an integer target, are there elements a, b, c, and d in nums such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target. Note: The solution se…
题目等级:3Sum(Medium) 题目描述: Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero. Note: The solution set must not contain duplicate triplets. Exam…
Best Time to Buy and Sell Stock with Transaction Fee 题目等级:Medium 题目描述: Your are given an array of integers prices, for which the i-th element is the price of a given stock on day i; and a non-negative integer fee representing a transaction fee. You m…
题目等级:Hard 题目描述:   There are two sorted arrays nums1 and nums2 of size m and n respectively.   Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).   You may assume nums1 and nums2 cannot be both empty.   E…
题目等级:Medium 题目描述:   You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.   You may…
package y2019.Algorithm.dynamicprogramming.hard; /** * @Auther: xiaof * @Date: 2019/12/11 08:59 * @Description: 1278. 分割回文串 III * * 给你一个由小写字母组成的字符串 s,和一个整数 k. * 请你按下面的要求分割字符串: * 首先,你可以将 s 中的部分字符修改为其他的小写英文字母. * 接着,你需要把 s 分割成 k 个非空且不相交的子串,并且每个子串都是回文串.…
题目等级:Easy 题目描述: Given a 32-bit signed integer, reverse digits of an integer. Example 1: Input: 123 Output: 321 Example 2: Input: -123 Output: -321 Example 3: Input: 120 Output: 21    题意:给出一个 32 位的有符号整数,你需要将这个整数中每位上的数字进行反转. 解题思路:   本题很简单,我们给出以下两种方法.  …