Given an array that have duplicated member
[9, 8, 2, 6, 1, 8, 5, 3, 4, 7]
You should find the repeat number and share the output like this.
{ 
  '1': 1,
 '2': 1,
| repos: | |
| - repo: https://github.com/pre-commit/pre-commit-hooks | |
| rev: v4.3.0 | |
| hooks: | |
| - id: trailing-whitespace | |
| - id: end-of-file-fixer | |
| - id: check-yaml | |
| - id: check-added-large-files | |
| - repo: https://github.com/dnephin/pre-commit-golang | |
| rev: v0.5.0 | 
| - repo: https://github.com/dnephin/pre-commit-golang | |
| rev: v0.5.0 | |
| hooks: | |
| - id: go-fmt | |
| - id: go-imports | |
| - id: no-go-testing | |
| - id: golangci-lint | |
| - id: go-unit-tests | 
| repos: | |
| - repo: https://github.com/pre-commit/pre-commit-hooks | |
| rev: v4.3.0 | |
| hooks: | |
| - id: trailing-whitespace | |
| - id: end-of-file-fixer | |
| - id: check-yaml | |
| - id: check-added-large-files | |
| - repo: https://github.com/dnephin/pre-commit-golang | |
| rev: v0.5.0 | 
| repos: | |
| - repo: https://github.com/pre-commit/pre-commit-hooks | |
| rev: v4.3.0 | |
| hooks: | |
| - id: trailing-whitespace | |
| - id: end-of-file-fixer | |
| - id: check-yaml | |
| - id: check-added-large-files | 
| Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. | |
| You may assume that each input would have exactly one solution, and you may not use the same element twice. | |
| You can return the answer in any order. | |
| Example 1: | |
| Input: nums = [2,7,11,15], target = 9 | |
| Output: [0,1] | |
| Explanation: Because nums[0] + nums[1] == 9, we return [0, 1]. | 
Given an array that have duplicated member
[9, 8, 2, 6, 1, 8, 5, 3, 4, 7]
You should find the repeat number and share the output like this.
{ 
  '1': 1,
 '2': 1,
| package main | |
| import ( | |
| "fmt" | |
| ) | |
| type opt struct { | |
| name string | |
| } | 
| package main | |
| import ( | |
| "fmt" | |
| ) | |
| type Count struct { | |
| People int | |
| } | 
| package rabbitmq | |
| import ( | |
| "log" | |
| "math/rand" | |
| "time" | |
| "github.com/streadway/amqp" | |
| ) | 
| // demo aum | |
| package main | |
| import ( | |
| "fmt" | |
| "time" | |
| ) | |
| func receiveOnly(ch <-chan string) { | |
| // ch <- "test" // it will error (send to receive-only type <-chan string) |