topic217

package
v0.0.0-...-b071cee Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2023 License: GPL-3.0 Imports: 0 Imported by: 0

README

存在重复元素

1. 题目描述

给定一个整数数组,判断是否存在重复元素。

如果存在一值在数组中出现至少两次,函数返回 true 。如果数组中每个元素都不相同,则返回 false 。

2. 示例

示例1

输入: [1,2,3,1]
输出: true

示例2

输入: [1,2,3,4]
输出: false

示例3

输入: [1,1,1,3,3,4,3,2,4,2]
输出: true

3. 解题

哈希表重拳出击

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL