Initial commit
This commit is contained in:
11
217. Contains Duplicate/217. Contains Duplicate.csproj
Normal file
11
217. Contains Duplicate/217. Contains Duplicate.csproj
Normal file
@@ -0,0 +1,11 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<RootNamespace>_217._Contains_Duplicate</RootNamespace>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
10
217. Contains Duplicate/Program.cs
Normal file
10
217. Contains Duplicate/Program.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace _217._Contains_Duplicate
|
||||
{
|
||||
internal class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("Hello, World!");
|
||||
}
|
||||
}
|
||||
}
|
||||
9
217. Contains Duplicate/Solution.cs
Normal file
9
217. Contains Duplicate/Solution.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace _217._Contains_Duplicate;
|
||||
|
||||
public class Solution
|
||||
{
|
||||
public bool ContainsDuplicate(int[] nums)
|
||||
{
|
||||
return nums.ToHashSet().Count != nums.Length;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user