func fn() { str := "" for i := 0; i < 100000; i++ { str += fmt.Sprintf("%d", i) } fmt.Println(str) }
Golang
How is a slice passed to a function in a programming language?
Tell me about design patterns. What is double-checked locking and what is it used for?
Explain why and which (regarding code output)
Is a Non-Repeatable Read possible when using the Read Committed isolation level?
Tell me how Redis works, what it is?
On line 7, it is concluded that the internal array will be overflowed and a new one will be created. Why did you decide that?
// What will be printed on each print? func fn(a []int) { a[2] = 5 a = append(a, 6) fmt.Println(a) // a = append(a, 7) a[0] = 5 fmt.Println(a) // } func main() { a := make([]int, 0, 5) for i := 0; i < 4; i++ { a = append(a, i) } fn(a[:3]) fmt.Println(a) // }
Explain how the goroutine scheduler works in Go (GMP)?
What happens to the Token Bucket rate limiter in the scenario: 1 request at the beginning of the second, 99 at the end, then another 100 in the next second?
Tell about your use of event-driven approach in your example.
Have there been any failures/problems at work?
// what's wrong with this code? how to improve it? func fn() { str := "" for i := 0; i < 100000; i++ { str += fmt.Sprintf("%d", i) } fmt.Println(str) }
Who architected the project — you as a feature lead, together with the team, or the team lead?
Explain what a map is in Go and how you understand it.
What tasks do you enjoy? What are you looking for?
Design a rate limiter for an external API with a limit of 100 requests per second/minute
// what will be printed on each print? func fn(a []int) { a[2] = 5 a = append(a, 6) fmt.Println(a) // a = append(a, 7) a[0] = 5 fmt.Println(a) // } func main() { a := make([]int, 0, 5) for i := 0; i < 4; i++ { a = append(a, i) } fn(a[:3]) fmt.Println(a) // }
How were they resolved?
Do you use Golang?