mirror of
https://github.com/cgzirim/seek-tune.git
synced 2025-12-18 09:24:19 +00:00
delete file
This commit is contained in:
parent
7a10a179b5
commit
2031bbc3ca
1 changed files with 0 additions and 18 deletions
|
|
@ -1,18 +0,0 @@
|
|||
package shazam
|
||||
|
||||
// deduplicate returns a list of unique integers from the given array.
|
||||
// The order of the given array is not preserved in the result.
|
||||
func deduplicate(array []int) []int {
|
||||
uniqueMap := make(map[int]struct{})
|
||||
|
||||
for _, num := range array {
|
||||
uniqueMap[num] = struct{}{}
|
||||
}
|
||||
|
||||
var uniqueList []int
|
||||
for num := range uniqueMap {
|
||||
uniqueList = append(uniqueList, num)
|
||||
}
|
||||
|
||||
return uniqueList
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue