Re: [闲聊] 每日leetcode

楼主: sustainer123 (caster)   2024-05-06 12:08:51
※ 引述《Rushia (早瀬ユウカの体操服 )》之铭言:
: https://leetcode.com/problems/remove-nodes-from-linked-list/description/
: 2487. Remove Nodes From Linked List
: 给你一个链结串行,移除串行中所有右边存在比他大的数字的的节点。
: https://assets.leetcode.com/uploads/2022/10/02/drawio.png
: 思路:
: 1.题目其实是在求一个最长递减串行,我们将原串行做反转之后把递增的串起来,再把
: 串起来的串行也反转即可。
: py code:
:
作者: JIWP (JIWP)   2024-05-06 12:09:00
别卷了
作者: digua (地瓜)   2024-05-06 12:09:00
大师
作者: wu10200512 (廷廷)   2024-05-06 12:13:00
static跟全域变量满像的只是你放在class里就只能用class的static函数改
作者: JIWP (JIWP)   2024-05-06 12:14:00
跟C的static一样吗
作者: wu10200512 (廷廷)   2024-05-06 12:15:00
java就是换皮c++
楼主: sustainer123 (caster)   2024-05-06 12:16:00
我C++没学好QQ
作者: SecondRun (雨夜琴声)   2024-05-06 12:17:00
不如C#
作者: JIWP (JIWP)   2024-05-06 12:17:00
剩我不会c++了要不要试试看用monotonic stack来解这一题
楼主: sustainer123 (caster)   2024-05-06 12:27:00
我想一下怎解
作者: DJYOSHITAKA (Evans)   2024-05-06 12:29:00
剩我只会一种语言了
楼主: sustainer123 (caster)   2024-05-06 12:31:00
老实讲我也只熟python C学过一年但写得不怎么样其他就摸过而已

Links booklink

Contact Us: admin [ a t ] ucptt.com