序列 数目leetcode delivery

Shiro550 反序列化

参考链接 https://www.bilibili.com/video/BV1iF411b7bD 环境搭建 搭环境看的这位师傅的,有图有步骤,爱了。 https://fireline.fun/2021/05/21/Java%E5%8F%8D%E5%BA%8F%E5%88%97%E5%8C%96%E6 ......
序列 Shiro 550

Java二次反序列化

前言 题目hook resolveClass存在入口类黑名单,就可以用二次反序列化绕过,例如巅峰极客的babyurl。 本质是,A类的a方法,内部可以实现反序列化,并且要反序列化的对象我们可控;在B入口类被禁用的情况下, 通过把要反序列化的恶意对象b放入A类,用没被禁用的入口类C的readObjec ......
序列 Java

java反序列化 ROME链

环境搭建 jdk8u181 <dependencies> <dependency> <groupId>rome</groupId> <artifactId>rome</artifactId> <version>1.0</version> </dependency> </dependencies> 利 ......
序列 java ROME

Java反序列化 CC4链

参考链接 https://github.com/frohoff/ysoserial/blob/master/src/main/java/ysoserial/payloads/CommonsCollections4.java https://www.bilibili.com/video/BV1NQ4y ......
序列 Java CC4 CC

Java反序列化 CC2链

参考链接 https://github.com/frohoff/ysoserial/blob/master/src/main/java/ysoserial/payloads/CommonsCollections2.java 环境搭建 CommonCollections4 jdk8u65 利用链分析 ......
序列 Java CC2 CC

Java反序列化 CC5链

参考链接 https://github.com/frohoff/ysoserial/blob/master/src/main/java/ysoserial/payloads/CommonsCollections5.java 环境搭建 Commons.Collections 3.2.1 jdk8u65 ......
序列 Java CC5 CC

Java反序列化 CC7链

参考链接 https://blog.csdn.net/qq_35733751/article/details/119862728 https://github.com/frohoff/ysoserial/blob/master/src/main/java/ysoserial/payloads/Com ......
序列 Java CC7 CC

java 序列话注解 @Transient

java 序列话注解 @Transient Java 序列化注解及其使用 简介 在 Java 程序中,对象的序列化是指将对象转换为字节流的过程,以便在网络上传输或保存到文件中。而反序列化则是将字节流重新转换为对象。 Java 提供了 java.io.Serializable 接口,用于标识可序列化的 ......
注解 序列 Transient java

java中的关键字transient,将不需要序列化的属性前添加关键字transient,序列化对象的时候,这个属性就不会被序列化

java中的关键字transient,将不需要序列化的属性前添加关键字transient,序列化对象的时候,这个属性就不会被序列化 这个关键字的作用其实我在写java的序列化机制中曾经写过,不过那时候只是简单地认识,只要其简单的用法,没有深入的去分析。这篇文章就是去深入分析一下transient关键 ......
序列 transient 属性 关键字 关键

Django序列化

关于Django中的序列化主要应用在将数据库中检索的数据返回给客户端用户,特别的Ajax请求一般返回的为Json格式 1、serializers 1 from django.core import serializers 2 ret = models.BookType.objects.all() 3 ......
序列 Django

09-序列化器的 many=True 实现原理

入门知识 上面说明了,解释器会先执行 new 方法,再执行 init方法 下面说明了,如果new返回的空对象不是当前init对应的类型,就不会执行init。 序列化器 many=True 的简化版 可以看到 many_init 方法返回的是 Alist的空对象,而不是 A 的空对象,因此,没有 A ......
序列 原理 many True 09

Leetcode刷题day7-字符串.反转ⅠⅡ.反转单词.右旋转

344.反转字符串 344. 反转字符串 - 力扣(LeetCode) 编写一个函数,其作用是将输入的字符串反转过来。输入字符串以字符数组 s 的形式给出。 不要给另外的数组分配额外的空间,你必须原地修改输入数组、使用 O(1) 的额外空间解决这一问题。 示例 1: 输入:s = ["h","e", ......
字符串 单词 字符 Leetcode day7

代码随想训练营第五十七天(Python)| 647. 回文子串、516.最长回文子序列

647. 回文子串 1、中心扩散法+双指针 class Solution: def countSubstrings(self, s: str) -> int: res = 0 for i in range(len(s)): # 以 i 为中心 res += self.countPalind(i, i ......
回文 训练营 序列 随想 代码

[LeetCode] 498. Diagonal Traverse 对角线遍历

题目 Given an m x n matrix mat, return an array of all the elements of the array in a diagonal order. 思考 最初在纸上写写画画试了很多想法,但都没能解决,真的。。太弱了T T。 后来在YT上看了个印度老 ......
对角线 对角 LeetCode Diagonal Traverse

[LeetCode Hot 100] LeetCode73. 矩阵置零

题目描述 思路一:开辟两个数组,时间复杂度O(m + n) 开辟两个数组用来记录哪些行、哪些列需要置为零。 这样时间复杂度为O(m + n)。 思路二: 原地算法:不适用额外空间或者说常数级空间来实现算法。 类似于使用set保存每行每列是否需要置零, 方法一:对应思路一 class Solution ......
LeetCode 矩阵 Hot 100 73

leetcode-1662-easy

Check If Two String Arrays are Equivalent 思路一:把第一个数组入队列,然后遍历比较第二个数组 public boolean arrayStringsAreEqual(String[] word1, String[] word2) { Deque<Charac ......
leetcode 1662 easy

leetcode-1732-easy

Find the Highest Altitude 思路一:直接遍历 public int largestAltitude(int[] gain) { int val = 0; int max = val; for (int i : gain) { val += i; max = Math.max( ......
leetcode 1732 easy

leetcode-1646-easy

Get Maximum in Generated Array You are given an integer n. A 0-indexed integer array nums of length n + 1 is generated in the following way: nums[0] = ......
leetcode 1646 easy

leetcode-2169-easy

Count Operations to Obtain Zero You are given two non-negative integers num1 and num2. In one operation, if num1 >= num2, you must subtract num2 from ......
leetcode 2169 easy

leetcode-2180-easy

Count Integers With Even Digit Sum Given a positive integer num, return the number of positive integers less than or equal to num whose digit sums are ......
leetcode 2180 easy

leetcode-1455-easy

Check If a Word Occurs As a Prefix of Any Word in a Sentence Given a sentence that consists of some words separated by a single space, and a searchWor ......
leetcode 1455 easy

leetcode-1464-easy

Maximum Product of Two Elements in an Array Given the array of integers nums, you will choose two different indices i and j of that array. Return the ......
leetcode 1464 easy

leetcode-1512-easy

Number of Good Pairs Given an array of integers nums, return the number of good pairs. A pair (i, j) is called good if nums[i] == nums[j] and i < j. E ......
leetcode 1512 easy

leetcode-1550-easy

Three Consecutive Odds Given an integer array arr, return true if there are three consecutive odd numbers in the array. Otherwise, return false. Examp ......
leetcode 1550 easy

leetcode-1572-easy

Matrix Diagonal Sum Given a square matrix mat, return the sum of the matrix diagonals. Only include the sum of all the elements on the primary diagona ......
leetcode 1572 easy

[LeetCode] 1688. Count of Matches in Tournament

You are given an integer n, the number of teams in a tournament that has strange rules: If the current number of teams is even, each team gets paired ......
Tournament LeetCode Matches Count 1688

Leetcode 80. 删除有序数组中的重复项 II

被前面类似的题禁锢了思路,自己写的双指针,感觉题解很巧妙,记录一下。这个解法不用记录cnt。 通用解法 为了让解法更具有一般性,我们将原问题的「保留 2 位」修改为「保留 k 位」。 对于此类问题,我们应该进行如下考虑: 由于是保留 k 个相同数字,对于前 k 个数字,我们可以直接保留 对于后面的任 ......
数组 Leetcode 80 II

Leetcode刷题day6-哈希表.双指针.三~四数求和.

454.四数相加Ⅱ 454. 四数相加 II - 力扣(LeetCode) 给你四个整数数组 nums1、nums2、nums3 和 nums4 ,数组长度都是 n ,请你计算有多少个元组 (i, j, k, l) 能满足: 0 <= i, j, k, l < n nums1[i] + nums2[ ......
指针 Leetcode day6 day

[LeetCode Hot 100] LeetCode19. 删除链表的倒数第N个结点

题目描述 思路一:采用两次遍历 第一遍遍历先获取链表的长度length 第二次从dummy节点开始走length - n步 然后将该节点指向下下个节点 思路二:采用一次遍历 设置虚拟节点dummyHead指向head 设定双指针p和q,初始都指向虚拟节点dummyHead 移动q,直到p与q之间相隔 ......
LeetCode 结点 Hot 100 19

[LeetCode Hot 100] LeetCode21. 合并两个有序链表

题目描述 思路:新建dummy去"穿针引线" 新建一个dummy节点去"穿针引线" 注意最后返回的是dummy.next 方法一: /** * Definition for singly-linked list. * public class ListNode { * int val; * List ......
LeetCode 两个 Hot 100 21