techferryman
techferryman
全部文章
分类
归档
标签
去牛客网
登录
/
注册
techferryman的博客
全部文章
(共89篇)
题解 | #两个链表的第一个公共结点#
/* public class ListNode { int val; ListNode next = null; ListNode(int val) { this.val = val; } }*/ public class Solution { ...
2023-06-06
0
232
题解 | #数组中的逆序对#
public class Solution { public int InversePairs(int [] array) { if (array == null || array.length < 2) { return 0; ...
2023-06-06
0
248
题解 | #第一个只出现一次的字符#
public class Solution { public int FirstNotRepeatingChar(String str) { int[] count = new int[128]; for (int i = 0; i < str.leng...
2023-06-06
0
223
题解 | #丑数#
public class Solution { public int GetUglyNumber_Solution(int index) { if (index <= 6) return index; int i2 = 0; int i3...
2023-06-06
0
198
题解 | #把数组排成最小的数#
import java.util.ArrayList; import java.util.Arrays; public class Solution { public String PrintMinNumber(int [] numbers) { String[] strs ...
2023-06-06
0
220
题解 | #整数中1出现的次数#
public class Solution { public int NumberOf1Between1AndN_Solution(int n) { int sum = 0; int level = 1; int high = n / 10; ...
2023-06-06
0
238
题解 | #连续子数组的最大和#
public class Solution { public int FindGreatestSumOfSubArray(int[] array) { int[] dp = new int[array.length]; int max = array[0]; ...
2023-06-04
0
217
题解 | #最小的K个数#
import java.util.ArrayList; import java.util.PriorityQueue; public class Solution { public ArrayList<Integer> GetLeastNumbers_Solution(int [...
2023-06-04
0
221
题解 | #数组中出现次数超过一半的数字#
public class Solution { public int MoreThanHalfNum_Solution(int [] array) { // 第一个打擂台的人 int voted = 1; int result = array...
2023-06-04
0
276
题解 | #字符串的排列#
import java.util.*; import java.io.*; public class Solution { public ArrayList<String> Permutation(String str) { if (str == null) re...
2023-06-04
0
280
首页
上一页
1
2
3
4
5
6
7
8
9
下一页
末页