摘要:
题目:88. 合并两个有序数组 方法一: 直接暴力将两个数组合并,然后再排序。 class Solution { public void merge(int[] nums1, int m, int[] nums2, int n) { System.arraycopy(nums2, 0, nums1, 阅读全文
摘要:
题目链接 题意:就是求X的平方根。 思路: 方法一: 注意:指数函数和对数函数的参数和返回值均为浮点数,因此运算过程中会存在误差。因此在得到结果的整数部分ans 后,我们应当找出ans 与 ans+1 中哪一个是真正的答案。 代码: 1 class Solution { 2 public int m 阅读全文
摘要:
Description Inhabitants of the Wonderland have decided to hold a regional programming contest. The Judging Committee has volunteered and has promised 阅读全文
摘要:
Description The branch of mathematics called number theory is about properties of numbers. One of the areas that has captured the interest of number t 阅读全文