摘要: 1. 题目描述 Merge two sorted linked lists and return it as a new sorted list. The new list should be made by splicing together the nodes of the first two 阅读全文
posted @ 2021-02-23 23:10 额是无名小卒儿 阅读(811) 评论(0) 推荐(0) 编辑
摘要: 今天再复习一下快排: 当初看左神的算法课,受益匪浅。 他是先讲解了荷兰国旗问题,然后再引出的快排,如下: 荷兰国旗问题: 给定一个数组arr,和一个数num,请把小于num的数放在数组的左边,等于num的数放在数组的中间,大于num的数放在数组的右边。 要求时间复杂度为O(N)、额外空间复杂度为O( 阅读全文
posted @ 2021-02-23 22:51 额是无名小卒儿 阅读(105) 评论(0) 推荐(0) 编辑