Sobes.tech

Condition: Given two arrays of objects. Each object contains a numeric field 'code'. Return a new array containing all objects from array a for which there exists an object in array b with the same 'code' value. The order of elements in the result is determined by the order of the corresponding 'code' in array b: objects from a should be arranged in the order in which their 'code' appears in b. If multiple objects with the same 'code' appear in b, only the first occurrence is considered. Input data: - a — array of objects of the form { code: number, ...rest }, length from 0 to 10^5 - b — array of objects of the form { code: number, ...rest }, length from 0 to 10^5 Output data: Array of objects from a, filtered and ordered by the first occurrence of the corresponding 'code' in b. Constraints: - 0 <= a.length, b.length <= 100 000 - The 'code' field is a non-negative integer - b may contain duplicate 'code' values — only the first occurrence is considered Example function: ```python # Available without import: json, sys, io def intersect_by_code(a, b): # Write solution here return [] ```

179

What types of engines do ClickHouse tables have?

Senior
179

How does the quality of written code affect the testing processes of software products?

Junior — Middle
179

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

Junior — Middle
179

What technologies and tools have you used in your practice?

Intern — Junior
179

Can you explain what the NoneType type in Python represents?

Junior — Middle
179

How to organize database migrations in CI/CD so as not to interrupt service operation?

Middle+
179

What reasons might prevent the use of PyCharm in your work?

Junior — Middle
179

Can Docker be used on Windows without the need for an installed WPF graphical interface?

Junior — Middle
179

What are the differences between FastAPI and Django frameworks when creating web applications?

Junior — Middle
179

What is idempotency in API?

Middle
179

What metaclass methods are activated when creating a new class in Python?

Junior — Middle
179

Can Python be considered a language that is compiled before execution?

Junior — Middle
179

Why are indexes needed? Explain using an example of a composite index (userId, updatedAt): three queries — by userId, by userId+updatedAt, and only by updatedAt. Where will the index be used?

Middle
179

[name] tell us about the mechanism of asynchrony in Python: what does it look like, where is it good, where is it bad, why was it invented?

Middle+
179

What methods can be used to guarantee the stability and timely operation of individual system components?

Middle — Middle+
179

Have you recently applied new language features in your projects?

Junior — Middle
179
/555