努力复健期末周知识
努力复健期末周知识
全部文章
分类
归档
标签
去牛客网
登录
/
注册
努力复健期末周知识的博客
全部文章
(共54篇)
题解 | 两个数组的交集
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @param nums1 int整型一维数组 # @param nums2 int整型一维数组 # @return int整型一维数组 # class Solution: def inters...
2026-04-26
0
20
题解 | 字母异位词的长度
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @param s string字符串 # @param c string字符串 # @return int整型 # class Solution: def isCongruent(self ,...
2026-04-26
0
22
题解 | 字符串哈希
import sys n=int(sys.stdin.readline().strip()) a = set() for _ in range(n): s = sys.stdin.readline().strip() a.add(s) print(len(a))
2026-04-26
0
23
题解 | 合并两个排序的链表
# class ListNode: # def __init__(self, x): # self.val = x # self.next = None # # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @para...
2026-04-26
0
28
题解 | 序列链表化
# class ListNode: # def __init__(self, x): # self.val = x # self.next = None # # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @para...
2026-04-26
1
29
题解 | 链表序列化
class Solution: def listnodeToVector(self , head: ListNode) -> List[int]: # write code here pre=head a=[] while...
2026-04-26
0
24
题解 | 移除链表元素
class Solution: def removeElements(self , head: ListNode, val: int) -> ListNode: # write code here dummy=ListNode(0) du...
2026-04-26
0
28
题解 | 两两交换链表中的结点
from os import pread class Solution: def swapPairs(self, head: ListNode) -> ListNode: # write code here dummy = ListNode(0) ...
2026-04-26
0
19
题解 | 两端问优先队列
import sys n=int(sys.stdin.readline().strip()) l=[] for _ in range(n): line=sys.stdin.readline().split() op=line[0] if op=='1': x=...
2026-04-26
0
29
题解 | 结构体优先队列
import heapq class Student: def __init__(self, chinese, math, english): self.chinese = chinese self.math = math self.engl...
2026-04-26
0
24
首页
上一页
1
2
3
4
5
6
下一页
末页