摘要:
给定一个数组 nums,编写一个函数将所有 0 移动到数组的末尾,同时保持非零元素的相对顺序。 示例: 输入: [0,1,0,3,12]输出: [1,3,12,0,0] class Solution { public void moveZeroes(int[] nums) { int count = 阅读全文
posted @ 2020-03-10 21:57
段流儿
阅读(96)
评论(0)
推荐(0)
摘要:
将两个有序链表合并为一个新的有序链表并返回。新链表是通过拼接给定的两个链表的所有节点组成的。 示例: 输入:1->2->4, 1->3->4输出:1->1->2->3->4->4 /** * Definition for singly-linked list. * public class List 阅读全文
posted @ 2020-03-10 21:37
段流儿
阅读(99)
评论(0)
推荐(0)