We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 89ea753 commit e3a7af5Copy full SHA for e3a7af5
contains-duplicate/Lustellz.ts
@@ -0,0 +1,7 @@
1
+function containsDuplicate(nums: number[]): boolean {
2
+ let tmp: number[] = nums.toSorted()
3
+ for(let i = 0 ; i < nums.length - 1 ; i++){
4
+ if(tmp[i]===tmp[i+1]) return true
5
+ }
6
+ return false
7
+};
0 commit comments