using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication9 { class Program { static void Main(string[] args) { // sql如下,我把它翻译成代码,加深理解 // SELECT MAX(id)FROM sys_men
1: 找小于最大的最大的 select max(Salary) from Employee where Salary<(select MAX(Salary) from Employee); 2. 排序 select Salary from Employee where Salary not in (select MAX(Salary)from Employee) order by Salary desc limit 1; select ( select distinct Salary from
2018-09-24 21:52:38 一.Next Greater Element I 问题描述: 问题求解: 本题只需要将nums2中元素的下一个更大的数通过map保存下来,然后再遍历一遍nums1即可. public int[] nextGreaterElement(int[] nums1, int[] nums2) { int[] res = new int[nums1.length]; Map<Integer, Integer> map = new HashMap<>()
前m大的数 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 7945 Accepted Submission(s): 2831 Problem Description 还记得Gardon给小希布置的那个作业么?(上次比赛的1005)其实小希已经找回了原来的那张数表,现在她想确认一下她的答案是否正确,但是整个的答案是很庞大的表,小希