派仔
派仔
全部文章
分类
题解(68)
归档
标签
去牛客网
登录
/
注册
Lincs
Do more, know more, be more
全部文章
(共51篇)
题解 | #两个链表生成相加链表#
import java.util.*; /* * public class ListNode { * int val; * ListNode next = null; * } */ public class Solution { private ListNode rev...
Java
2021-06-23
1
606
题解 | #判断链表中是否有环#
public class Solution { public boolean hasCycle(ListNode head) { ListNode fast = head; ListNode slow = head; while (fast !...
Java
2021-06-23
17
1539
题解 | #反转链表#
public class Solution { public ListNode ReverseList(ListNode head) { ListNode prev = null; ListNode curr = head; while (cu...
Java
2021-06-23
1
540
查找组成一个偶数最接近的两个素数
import java.util.*; public class Main { public Main() { } private boolean isPrime(int num) { for (int i = 2; i <= num/i; i++...
Java
2020-08-12
23
2472
超长正整数相加
import java.util.*; public class Main { public Main() { } public String addLongInteger(String addend, String augend) { StringBu...
Java
2020-08-12
4
830
挑7
import java.util.*; public class Main { public Main() { } private boolean conatins7(int n) { while (n != 0) { if (n...
Java
2020-08-12
3
1180
输出单向链表中倒数第k个结点
import java.util.*; public class Main { private int size; private ListNode head; private class ListNode { int val; Lis...
Java
2020-08-12
9
1502
从单向链表中删除指定值的节点
import java.util.*; public class Main { private ListNode head; private class ListNode { int val; ListNode next; Lis...
Java
2020-08-12
39
2063
无线OSS-高精度整数加法
import java.util.*; public class Main { public Main() { } // return num1 > num2 ? private int compare(String num1, String num2) ...
Java
2020-08-12
4
1163
201301 JAVA 题目2-3级
DP import java.util.*; public class Main { public Main() { } public int count(int n, int m) { int[][] dp = new int [n][m]; ...
Java
2020-08-12
4
950
首页
上一页
1
2
3
4
5
6
下一页
末页