Sobes.tech

Explain the purpose and how the sync.Once structure works in Go.

Junior — Middle
215

Tell me about your career path at Wildberries: what grade did you start at, and how did you grow?

Middle+
214

Are there mechanisms that help eliminate collisions in programming?

Middle+
214

Where is memory allocated for a slice — on the stack or on the heap?

Senior
213

What tools are available in Go for detecting data races?

Middle+
213

If losing multiple analytics events is acceptable — how can you do without the outbox pattern?

Senior
212

How do you rate your level: junior, mid, senior?

Middle
212

How does the process of handling an HTTP request work in a browser, and what happens on the client and server sides?

Junior — Middle
211

There is a local limit for a specific filter and a global HH limit of 16,000 — how to architect this?

Senior
210

Why is mutex not suitable for distributed lock?

Senior
209

Question about a slow service For example, when creating an order. There is a request to the service and a response, and between these two actions, we log the products ordered (for example, to count the popularity of products). The analytics service periodically works slowly or times out, and we fail to respond, losing orders. What to do to stop losing orders and money accordingly? Come up with a way to parallelize the order and analytics.

Senior
209

What will happen in the end to the length of the array when appending concurrently from 1000 goroutines?

Senior
208

What are the key differences between a binary tree and a balanced tree in data structures?

Junior — Middle
208

Does the standard map provide thread safety when multiple threads operate simultaneously?

Junior — Middle
208

How often have you had to delve into databases — writing and optimizing queries?

Middle
208

If all values fall into one bucket and overflow buckets accumulate, what will happen during same-size grow (repacking without increasing size)?

Middle+
208

Why are proposals currently open that indicate dissatisfaction with the current situation?

Senior
207

What can be done to avoid map evacuation in a high-load service?

Middle+
205

Given the "orders" table: +----+---------+---------------------+-------------+ | id | user_id | created_at | price_total | +----+---------+---------------------+-------------+ | 1 | 111 | [phone]:00:00 | 2000 | | 2 | 222 | [phone]:00:00 | 1000 | | 3 | 111 | [phone]:00:00 | 2000 | | 4 | 222 | [phone]:00:00 | 5000 | | 5 | 333 | [phone]:00:00 | 1000 | +----+---------+---------------------+-------------+ Write an SQL query that returns the number of orders for each user with price_total greater than or equal to 1000, sorted in descending order by order count: +---------+-------------+ | user_id | order_count | +---------+-------------+ | 111 | 2 | | 222 | 1 | | 333 | 1 | +---------+-------------+

Middle+
205

What will the program output? Why? func main() { timeStart := time.Now() _, _ = <-worker(), <-worker() println(int(time.Since(timeStart).Seconds())) } func worker() chan int { ch := make(chan int) go func() { time.Sleep(3 * time.Second) ch <- 1 }() return ch }

Senior
205
/13