MCPcopy Create free account
hub / github.com/LjyYano/LeetCode / L0086_PartitionList

Class L0086_PartitionList

src/main/java/L0086_PartitionList.java:23–97  ·  view source on GitHub ↗

https://leetcode.cn/problems/partition-list/ 给你一个链表的头节点 head 和一个特定值 x ,请你对链表进行分隔,使得所有 小于 x 的节点都出现在 大于或等于 x 的节点之前。 你应当 保留 两个分区中每个节点的初始相对顺序。 示例 1: ![img](https://assets.leetcode.com/uploads/2021/01/04/partition.jpg) 输入:head = [1,4,3,2,5,2], x = 3 输出:[1,2,2,4,3,5] 示例 2: 输入:head = [2,1], x = 2 输出:[1,

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected