Sobes.tech

Is it possible to make memory constant without removing the map?

174

""" Seats in the cinema are arranged in a single row. A newly arrived viewer chooses a seat, to sit as far away as possible from other viewers in the row. That is, the distance from the seat to the nearest viewer should be maximized. It is guaranteed that there are always free seats in the row and at least one viewer is already seated. Write a function that, given a row of seats (an array of zeros and ones), returns the distance (number of gaps between seats) from the chosen seat to the nearest viewer. [1, 0, 0, 0, 1] -> 2 [1, 0, 1, 0, 0, 1, 0, 0, 1] -> 2 [1, 0, 1, 0] -> 1 [0, 0, 0, 1] -> 3 [1, 0, 0, 0] -> 3 place = ((right - left) / 2) """ func maxPlaces(arr []int) int { }

174

What stage are you at in your job search: actively or passively considering vacancies?

173

How do you coordinate with neighboring teams on contracts — protobuf, event contracts, what is the difference?

172

What are your salary expectations (net)?

171

Tell about your experience, project, and tasks.

170

Would you be willing to switch to another language? Maybe there's something interesting you'd like to learn?

168

Have you used public clouds in your work (Yandex.Cloud, AWS, etc.)?

164

How many people are currently on the project?

164

How is git flow organized — branches, environments, deployment?

163

Explain the entire code of the Pipe function with comments

162

Please tell us which language you are currently using as your main language? Are there additional languages you work with?

162

On line 60 buf = buf[:0] — what is happening here?

162

Have you used any clouds? Yandex, Google, AWS, or other cloud services?

162

Can the maxSegment algorithm be improved?

162

Describe the functional and non-functional requirements for a scalable messenger.

162

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

160

Briefly describe the architecture of the accounts receivable project.

160

/* There is an application with a microservice architecture. A microservice can be abstracted using the Backend interface. To access a single instance of a microservice, the BackendImpl type, which is already implemented, can be used. There are several dozens of instances of each microservice, each accessible by its address addr. However, individual instances of the microservice are unreliable: they can crash, be unavailable, or overloaded. Therefore, you need to implement a type Balancer that also implements the Backend interface and performs client-side load balancing among the instances of the microservice, choosing the **least loaded** instance each time. */

159
/11