摘要:
动态规划 1. 剑指 Offer 14- I. 剪绳子 I 动态规划来解 class Solution { public int cuttingRope(int n) { if (n == 2) return 1; if (n == 3) return 2; int dp[] = new int 阅读全文
摘要:
数字处理 1. 剑指 Offer 56 - I. 数组中数字出现的次数 class Solution { public int[] singleNumbers(int[] nums) { int n = 0, m = 1, x = 0, y = 0; // 任何数与0异或,都是其本身 for(i 阅读全文