# 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.
Python
How would we represent the graph needed for this task, and how can we obtain the answer (route) from it?
From what amount are you willing to consider an offer?
Do you have experience with designing and implementing distributed applications or systems?
Approximately what time frame should be allocated for preparing for an interview on algorithms and data structures?
Do you have practical experience programming in languages other than those used in the project?
What is your experience with Python, and how long have you been using it in your projects?
from collections import Counter def min_s(a: str, s: str) -> str: need = Counter(a) res = ""
What other programming languages or technologies have you used in your projects besides Python?
Do you have experience in development using multithreading and asynchronous technologies?
Tell me more about your last project: what you did, what tasks you performed, what was your area of responsibility.
How do we find the starting city of the route?
In what correct order should the cash withdrawal process work in a real ATM?
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?
What questions would you like to ask about the company during the interview?
```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 ```
Share your latest professional experience and achievements.
Can you describe the main responsibilities and projects you worked on at your previous job?
""" 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]: ...
""" 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: ...