开着拖拉机搬砖
开着拖拉机搬砖
全部文章
分类
题解(6)
归档
标签
去牛客网
登录
/
注册
开着拖拉机搬砖的博客
TA的专栏
0篇文章
0人订阅
笔记/面试题/知识分享
0篇文章
0人学习
全部文章
(共4篇)
题解 | #删除有序链表中重复的元素-II#
直接使用栈进行去重 Stack<Integer> stack = new Stack<>(); ListNode root = new ListNode(-1); ListNode cur = head, p; stack.p...
2021-08-24
0
286
题解 | #删除链表的倒数第n个节点#
public static ListNode removeNthFromEnd (ListNode head, int n) { if (getLength(head) == n){ head = head.next; return ...
2021-07-05
0
334
题解 | #合并两个有序的数组#
直接将B数组的代码合并到A数组中去,然后直接使用Arrays.sort方法进行重新的排序public void merge(int A[], int m, int B[], int n) { for (int i = 0; i < n; i++) { A[i+...
2021-07-03
0
420
题解 | #二分查找-II#
就是为了单纯的记录, public int search (int[] nums, int target) { // write code here int low = 0, high = nums.length, mid=0; if (high == 0)...
2021-07-03
0
342