Sobes.tech

# Complication # We have a new product feature: reserving money through a mobile app. # For this, we need to add a new method reserve(amount) to the ATM class. Also, we should consider HardwareError in SDK methods.

129

How would we represent the graph needed for this task, and how can we obtain the answer (route) from it?

129

From what amount are you willing to consider an offer?

128

Approximately what time frame should be allocated for preparing for an interview on algorithms and data structures?

Junior — Middle
125

What is your experience with Python, and how long have you been using it in your projects?

Junior — Middle
125

from collections import Counter def min_s(a: str, s: str) -> str: need = Counter(a) res = ""

125

What other programming languages or technologies have you used in your projects besides Python?

Junior — Middle
124

Do you have experience in development using multithreading and asynchronous technologies?

Junior — Middle
124

Tell me more about your last project: what you did, what tasks you performed, what was your area of responsibility.

124

How do we find the starting city of the route?

123

In what correct order should the cash withdrawal process work in a real ATM?

122

Why do we need to do this? What's the idea? Suppose we find the end cities — first, how do we find them? Second, how do we restore the route itself?

121

```python from collections import Counter def min_s(a: str, s: str) -> str: need = set(a) window = Counter() res = "" c = 0 left = 0 best_len = float('inf') for right, char in enumerate(s): if char in need: window[char] += 1 if window[char] == 1: c += 1 while c == len(need): if right - left + 1 < best_len: res = s[left:right + 1] best_len = right - left + 1 if s[left] in need: window[s[left]] -= 1 if window[s[left]] == 0: c -= 1 left += 1 return res ```

119

Share your latest professional experience and achievements.

Junior — Middle
119

Can you describe the main responsibilities and projects you worked on at your previous job?

Junior — Middle
119

""" Given a set of city pairs: - each pair represents a direct flight taken by an employee; - the direction of the flight is unknown; - the order of flights is also lost. It is known that all these flights belong to a single journey. Each subsequent flight started from the city where the previous one ended. No city was visited twice by the employee. The starting city of the journey is different from the ending city. Output the cities in the order of the route. There are two possible answers, any of which is acceptable. Examples: [("Moscow", "Belgrade")] -> ["Moscow", "Belgrade"] [("Moscow", "Belgrade"), ("Moscow", "Yerevan")] -> ["Yerevan", "Moscow", "Belgrade"] Flight = tuple[str, str] def get_route(flights: list[Flight]) -> list[str]: ...

118

""" Given a sequence of integers. Find the minimal possible product of a pair of elements in the sequence (a pair is two elements, not necessarily consecutive). For example, for the sequence 9 4 2 5 3, the answer will be 6. """ def find_min_product(arr: list[int]) -> int: ...

117
/5