Sobes.tech

Is a binary tree a balanced structural state?

Junior — Middle
258

Can you explain what the term 'Consumer group' means in Kafka system?

Junior — Middle
258

How to kill a process in Linux? With which commands?

Middle
256

What tools were used for application performance analysis?

Junior — Middle
254

We have a database of user passwords, passwords are hashed (using hashPassword function), and we also know the set of characters that can be used in passwords (variable alphabet). Our task is to implement the RecoverPassword function so that it recovers the password from the known hash and TestRecoverPassword completes successfully. Basic requirements: Solve as you wish package main import ( "crypto/md5" "fmt" ) var alphabet = []rune{'a', 'b', 'c', 'd', '1', '2', '3'} func RecoverPassword(h []byte) string { return "" } func hashPassword(in string) []byte { h := md5.Sum([]byte(in)) return h[:] } func main() { tests := []string{"a", "12", "abc333d"} ok := true for _, exp := range tests { h := hashPassword(exp) act := RecoverPassword(h) if act != exp { fmt.Printf("Error: expected %q, got %q\n", exp, act) ok = false } } if ok { fmt.Println("Tests passed successfully") } }

Middle+
253

What does the top team do under the hood (from the interviewer's question)?

Middle+
248

Write a function Exclude that returns elements from slice a that are not in slice b.

Senior
248

Write a query that corrects data: replace parent_id with NULL only for categories that refer to themselves. The expected state of the table after update is shown.

Senior
248

What criteria will you use to choose an employer if you have multiple offers?

Middle
247

Tell about your experience with programming languages other than Go, and how do you like Go itself?

Senior
246

How did you solve the data desynchronization problem during migration between storages?

Senior
242

Who makes the decision to rollback?

Senior
240

What metrics do you track to assess the state and performance of services?

Junior — Middle
239

On line 15, the map declaration should be with square brackets, not curly braces. Why?

Senior
239

How does top calculate CPU%? What algorithm does it use?

Middle
239

How much code do you usually write in Go per project or period?

Junior — Middle
239

In a query, WHERE is used, but there is also the HAVING operator — what is the difference between them?

Middle
238

Apart from Go, what other message brokers, databases, have you worked with?

Senior
237

1. 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. 2. Find users who made purchases totaling more than 5000 rubles. Display their id, first name, last name, and total purchase amount in the format: user id | first name | last name | total amount.

Senior
235

There is the following database schema -- Customers table CREATE TABLE customers ( id BIGSERIAL PRIMARY KEY, name VARCHAR(255) NOT NULL, city VARCHAR(255) NOT NULL ); -- Products table CREATE TABLE products ( id BIGSERIAL PRIMARY KEY, name VARCHAR(255) NOT NULL, category VARCHAR(100) ); -- Order items table CREATE TABLE order_items ( order_id BIGINT NOT NULL, product_id BIGINT NOT NULL, qty DECIMAL(10, 3) NOT NULL CHECK (qty > 0), -- 10 digits, 3 decimal places price NUMERIC(10, 2) NOT NULL CHECK (price >= 0), PRIMARY KEY (order_id, product_id) ); -- Orders table CREATE TABLE orders ( id BIGSERIAL PRIMARY KEY, customer_id BIGINT, order_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, status VARCHAR(50) NOT NULL CHECK (status IN ('pending', 'paid', 'shipped', 'delivered', 'cancelled')) ); 1. Show the TOP 10 users by total order amount who have made more than 2 orders in the last 30 days. 2. Show the TOP 3 categories by revenue over the last 6 months.

Middle+
233
/13