摘要: The Employee table holds all employees. Every employee has an Id, a salary, and there is also a column for the department Id. + + + + + | Id | Name | 阅读全文
posted @ 2020-02-13 23:22 hyx1 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 题目描述 给定一个double类型的浮点数base和int类型的整数exponent。求base的exponent次方。 保证base和exponent不同时为0 1 public class Solution { 2 public double cal(double base, int exp) 阅读全文
posted @ 2020-02-13 22:33 hyx1 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 题目描述 在一个长度为n的数组里的所有数字都在0到n-1的范围内。 数组中某些数字是重复的,但不知道有几个数字是重复的。也不知道每个数字重复几次。请找出数组中任意一个重复的数字。 例如,如果输入长度为7的数组{2,3,1,0,2,5,3},那么对应的输出是第一个重复的数字2。 1 public cl 阅读全文
posted @ 2020-02-13 22:13 hyx1 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 题目描述 输入一个整数,输出该数二进制表示中1的个数。其中负数用补码表示。 1 public class Solution { 2 public int NumberOf1(int n) { 3 int count = 0; 4 while(n != 0) { 5 count++; 6 n = (n 阅读全文
posted @ 2020-02-13 22:02 hyx1 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 题目描述 给你一根长度为n的绳子,请把绳子剪成整数长的m段(m、n都是整数,n>1并且m>1),每段绳子的长度记为k[0],k[1],...,k[m]。请问k[0]xk[1]x...xk[m]可能的最大乘积是多少?例如,当绳子的长度是8时,我们把它剪成长度分别为2、3、3的三段,此时得到的最大乘积是 阅读全文
posted @ 2020-02-13 21:28 hyx1 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 题目描述 地上有一个m行和n列的方格。一个机器人从坐标0,0的格子开始移动,每一次只能向左,右,上,下四个方向移动一格,但是不能进入行坐标和列坐标的数位之和大于k的格子。 例如,当k为18时,机器人能够进入方格(35,37),因为3+5+3+7 = 18。但是,它不能进入方格(35,38),因为3+ 阅读全文
posted @ 2020-02-13 20:59 hyx1 阅读(193) 评论(0) 推荐(0) 编辑
摘要: Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. Example: 阅读全文
posted @ 2020-02-13 20:05 hyx1 阅读(77) 评论(0) 推荐(0) 编辑
摘要: Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: Op 阅读全文
posted @ 2020-02-13 19:58 hyx1 阅读(126) 评论(0) 推荐(0) 编辑
摘要: Given a linked list, remove the n-th node from the end of list and return its head. Example: Given linked list: 1->2->3->4->5, and n = 2. After removi 阅读全文
posted @ 2020-02-13 19:35 hyx1 阅读(113) 评论(0) 推荐(0) 编辑
摘要: Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. A mapping of digit to le 阅读全文
posted @ 2020-02-13 19:12 hyx1 阅读(123) 评论(0) 推荐(0) 编辑