Sobes.tech

What qualities of employees help build an effective and harmonious team?

Junior — Middle
147

The candidate asks to explain the proposed solution (why it is necessary to compare the products of the minimum and maximum pairs).

144

Can you estimate the complexity of such a solution (in terms of time and memory)? And why is the complexity not O(n^2)?

142

When was the last time you solved algorithmic problems for practice or projects?

Junior — Middle
142

How to implement a simple lock mechanism in memory to protect against concurrent access without using external dependencies?

142

# ATM that is loaded with cash cassettes containing banknotes, with our app onboard # should be able to dispense banknotes for a specified amount or respond with a refusal # When dispensing banknotes, the amount is deducted from the ATM's balance. # Allowed denominations: 50R, 100R, 500R, 1000R, 5000R. class ATM: pass # place for code # ATM device: # - money is stored in cassettes inside the ATM, which are loaded and reloaded by a courier; # - each cassette contains banknotes of its denomination; # - the ATM can count the remaining banknotes in the cassettes, but this operation takes a considerable amount of time - it should be called as rarely as possible. # API for interacting with the ATM hardware. # The SDK interface can be modified/extended by mutual agreement if necessary. class SDK(ABC): @abstractmethod def count_banknotes(self, banknote: int) -> int: pass @abstractmethod def move_banknote_to_dispenser(self, banknote: int, count: int) -> None: pass @abstractmethod def open_dispenser(self) -> None: pass

141

# OneEditApart("cat", "dog") -> false # OneEditApart("cat", "cats") -> true # OneEditApart("cat", "cut") -> true # OneEditApart("cat", "cast") -> true # OneEditApart("cat", "at") -> true # OneEditApart("cat", "acts") -> false def OneEditApart(s1, s2) -> bool:

141

class ATM(SKD): def __init__(self, atm_api: "SKD"): self.atm_api: SKD = atm_api self.bills_count: dict[int:int] = {bill: self.atm_api.count_banknotes(bill) for bill in BILLS} def withdraw(self, amount: int) -> bool: bills_plan: dict[int: int] = {} remaining = amount for bill in BILLS: available = self.bills_count[bill] take = min(remaining // bill, available) if take > 0: bills_plan[bill] = take remaining -= take * bill if remaining != 0: return False bills_count_const = {50: 0, 100: 2, 500: 0, 1000: 0, ...}, expected = True @pytest.mark.parametrize( "bills_count_const,expected", [ ({5000: 0, 1000: 0, 500: 0, 100: 0, 50: 0}, False), ({5000: 100, 1000: 100, 500: 100, 100: 100, 50: 100}, True), ({5000: 1, 1000: 0, 500: 0, 100: 2, 50: 0}, True) ] ) def test_false(bills_count_const, expected): atm = ATM(FakeSDK()) atm.bills_count = bills_count_const amount = 1000 res = atm.withdraw(amount) assert res == expected

141

Is there experience in supporting or developing distributed systems?

141

What was the maximum size of data you ever stored or processed in your practice?

Junior — Middle
141

Do you have experience creating and maintaining systems based on distributed architectures?

Junior — Middle
140

In which countries are you considering work or collaboration options?

Junior — Middle
139

At what stage is your job or project search now?

Junior — Middle
137

```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 and \ 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 ```

136

The interviewer clarifies whether the candidate sees the problem condition.

134

What principle should be followed when moving the left boundary of a window that already covers the entire alphabet?

130

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

130
/5