Sobes.tech

Briefly describe the architecture of the accounts receivable project.

160

What was the profile of read and write load for these storages: how many requests per second?

160

What was the largest amount of data you worked with, and how many read/write requests were there?

158

Why did you decide to use LLM instead of just logic in code?

157

Can you briefly describe your experience? What is your main programming language? How many years of experience do you have in industrial development?

157

How does JWT differ advantageously from storing sessions on the server?

156

// code snippet for the best() function // with error handling for no backend available

155

func Pipe(p Producer, c Consumer) error { // TODO buf := make([]any, 0, MaxItems) cookies := make([]int, 0) flush := func() error { if len(buf) == 0 { return nil } if err := c.Process(buf); err != nil { return err } for _, cookie := range cookies { if err := p.Commit(cookie); err != nil { return err } } buf = buf[:0] cookies = cookies[:0] return nil } for { items, cookie, err := p.Next() if err != nil { flush() return err }

153

How much memory is initially allocated for the buffer?

153

What is the main programming language you use? Do you use C++ or Python?

153

Describe the algorithm for solving the maxSegment problem.

152

Why was the backend.Invoke call moved outside the mutex?

152

The load balancer should understand that the backend responds with errors, and after exceeding a threshold for a certain period, exclude it from balancing (Circuit Breaker).

150

What will happen if Consumer.Process returns an error — will the data in the buffer be lost?

150

Given a string S, count the number of substrings in this string that contain all characters from this string at least once. Examples: "abca" -> 3 // abc, bca, abca "aa" -> 3 // aa, a, a, "ffg" -> 2 // ffg, fg

149

Where do you live, where are you located?

147

Given a string of characters, find the number of index pairs i and j (i <= j) between which there are no repeating characters, inclusive. For the string "aba", the answer is 5: [0, 0] ("a") [0, 1] ("ab") [1, 1] ("b") [1, 2] ("ba") [2, 2] ("a") For the string "acbb", what is the answer?

147

What programming languages, besides Go, do you use for yourself or in commercial development?

147

What is the maximum number of requests per second you currently handle under high load?

147

/* We need to transfer data from a certain source to a consumer. The source provides data in small batches (~tens of records), while the consumer works more efficiently with larger batches (~thousands of records). A real-world example is transferring data from Kafka queues to a Clickhouse database. Source: - Conditionally infinite. - The source never returns more than MaxItems records per call to Next. - During a single "session" (one call to the Pipe function), the source returns new data on each Next call. - However, after a restart, the source resumes from the last "confirmed" position, set by a cookie. Therefore, *each* cookie value returned by Next, after data is saved in the receiver, must be fixed with a Commit call, strictly in the same order they were returned by Next. Receiver: - Cannot process more than MaxItems at once. The task is to implement the function func Pipe(p Producer, c Consumer) error which reads data from the source, groups it into a buffer of size not more than MaxItems, and saves it to the receiver, then commits the progress in the source. */ const MaxItems = 9999 // Producer interface // Next returns: // - batch of items to be processed // - cookie to be committed when processing is done // - error // Commit is used to mark data batch as processed // type Producer interface { Next() (items []any, cookie int, err error) Commit(cookie int) error } type Consumer interface { Process(items []any) error } func Pipe(p Producer, c Consumer) error { // TODO }

145
/11