派仔
派仔
全部文章
题解
归档
标签
去牛客网
登录
/
注册
Lincs
Do more, know more, be more
全部文章
/ 题解
(共68篇)
数字颠倒
import java.util.Scanner; public class Main { private static String getString(int number) { StringBuilder s = new StringBuilder(); ...
2020-08-07
7
1432
[Java] 进制转换
使用Map提高查找效率 import java.util.*; public class Main { private final static int BASE = 16; private static Map<Character, Integer> map = new Ha...
Java
2020-08-07
195
16660
二进制中1的个数
public class Solution { public int NumberOf1(int n) { int count = 0; while (n != 0) { // n < 0,则符号位为1 ...
2020-05-14
2
536
序列化二叉树
public class Solution { String Serialize(TreeNode root) { // 每个结点以"!"分隔开,方便后续的反序列化 if (root == null) { return "#!"; ...
2020-05-07
1
772
按之字形顺序打印二叉树
public class Solution { public ArrayList<ArrayList<Integer> > Print(TreeNode pRoot) { ArrayList<ArrayList<Integer> &g...
2020-05-07
1
772
二叉树的下一个结点
public class Solution { public TreeLinkNode GetNext(TreeLinkNode pNode) { if (pNode == null) { return null; } ...
2020-05-07
1
632
链表中环的入口结点
public class Solution { public ListNode EntryNodeOfLoop(ListNode pHead) { ListNode intersect = getIntersect(pHead); if (intersect ...
2020-05-07
1
762
删除链表中重复的结点
public class Solution { public ListNode deleteDuplication(ListNode pHead) { if (pHead == null) { return null; } ...
2020-05-07
1
676
首页
上一页
1
2
3
4
5
6
7
下一页
末页