Sobes.tech

Given an array slice of integers. Write a function remove that deletes all zeros Examples: remove([]) -> [] remove([0]) -> [] remove([1,0,0,2]) -> [1,2]

Senior
207

Hash was calculated, bucket found, new value inserted. What happens when a new value with the same hash (collision) arrives?

Middle+
206

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

Does gRPC operate over HTTP or not? How does it work?

Senior
204

What happens in INNER JOIN if one row on the left matches multiple rows on the right?

Middle+
204

What does the Index Only Scan vs Index Scan in PostgreSQL depend on?

Middle+
204

Imagine a year has passed in the company — what should happen for you to realize you made the right choice?

Senior
204

What are your expectations from the company besides the project?

Senior
202

Display unique combinations of user and product ID for all purchases made by users before they were banned. Sort first by username, then by SKU. Find users who made purchases totaling more than 5000 rubles. Display their names in the format user ID | first name | last name | total purchases.

Middle
202

How was the configuration of ClickHouse set up in shards and replicas?

Senior
202

-- Condition -- Find categories where the parent category is the same as the category itself -- Sort the result by id in ascending order -- EXAMPLE -- +----+----------+-----------+ -- | id | name | parent_id | -- +----+----------+-----------+ -- | 1 | pharma | 1 | -- | 2 | products | 4 | -- | 3 | games | 3 | -- | 4 | music | 2 | -- +----+----------+-----------+ -- EXPECTED RESULT -- +--------+ -- | name | -- +--------+ -- | pharma | -- | games | -- +--------+

Senior
202

Why did you decide to change jobs and join Ozon?

Middle+
202

Have you worked in a company as an external or full-time employee?

Middle
202

Implement a function that takes []any and delta int. It should increase only the first occurrences of unique integers by delta. Other types and repeated numbers should remain unchanged. The function should return the updated slice and two numbers: - updated — how many unique numbers were changed, - duplicates — how many numeric elements turned out to be duplicates func IncrementUniqueIntsInMixed(xs []any, delta int) ([]any, int, int) { // your code }.

Middle+
202

What are TCP and UDP, and what is the difference?

Middle
201

If a high-priority filter is too broad and eats up the entire budget — how to solve it?

Senior
201

Briefly about production: who deploys, who monitors, and so on

Senior
199

Scenario For example, 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 product popularity). The analytics service periodically runs slowly or times out, and we fail to respond, losing orders. What should be done to stop losing orders and, consequently, money?

Middle+
199
/13