carloscn / carloscn/structstudy

leetcode203:移除链表元素(remove-linked-list-elements)

Open
#61 2 comments 0 reactions 1 assignee Claimed by @carloscn View on GitHub
Level-easy 一般问题 链表
Dominant language
C
Stars
4
Forks
1
PR merge metrics
No merged PRs in 30d

Description

### 问题描述

给你一个链表的头节点 head 和一个整数 val ,请你删除链表中所有满足 Node.val == val 的节点,并返回 新的头节点 。

示例 1:
![image](https://user-images.githubusercontent.com/16836611/201917498-1278a00b-f488-42cb-a503-2972d827d134.png)
输入:head = [1,2,6,3,4,5,6], val = 6
输出:[1,2,3,4,5]

示例 2:
输入:head = [], val = 1
输出:[]

示例 3:
输入:head = [7,7,7,7], val = 7
输出:[]

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.