Sobes.tech

How many connected regions are in the matrix (Number of Connected Regions)? Condition Given a 2D matrix of integers. Each cell contains a number. Two cells are considered connected if they are adjacent horizontally or vertically and contain the same number. A connected region is a maximum group of cells with the same value, connected to each other. Write a function that returns the number of such connected regions in the matrix. Input data A 2D array of integers grid (matrix size m×n). Output data An integer — the number of connected regions. Constraints 1 <= m, n <= 100 Code template: # Available without import: json, sys, io def count_regions(grid): # TODO: implement the solution here return 0

Middle+
КасперскийКасперский
29

When is a linked list better than a regular list?

Middle+
Код Открытия
29

How do you check if a specific port is open on a remote server from a Linux workstation?

Middle
КасперскийКасперский
29

Are there any questions about the interview stages?

Middle+
КасперскийКасперский
28

Have you ever written tests?

Senior
РунитиРунити
28

What databases have you had to work with as a developer?

Middle+
КасперскийКасперский
28

What is the complexity of removing an element from a list by index?

Middle+
КасперскийКасперский
28

Do you have knowledge of how processes are created and interact in Linux?

Middle+
КасперскийКасперский
28

How do you navigate and work in Unix systems: how to connect and perform basic diagnostics?

Senior
РунитиРунити
27

After launching the fee, the money is deducted from users, but the manager does not see the company's income. Where could the money be and how to diagnose it?

Senior
РунитиРунити
27

How many threads can execute bytecode in Python simultaneously?

Middle+
КасперскийКасперский
27

How to change the data model to unambiguously combine four transactions of one transfer and then perform a refund with one action?

Senior
РунитиРунити
27

Do you have documents of military registration and higher education on hand?

Middle+
КасперскийКасперский
27

What approaches do you use for competitive and parallel task execution in Python, including the impact of GIL?

Middle+
КасперскийКасперский
27

Show the top 5 users by the number of transactions they have made.

Senior
РунитиРунити
27

How to solve the problem of finding duplicate strings without using Counter?

Middle+
КасперскийКасперский
27

Implement pseudocode for fee collection in the existing method `User.transfer`: what entries and checks are necessary?

Senior
РунитиРунити
27

Can you handle writing a raw SQL query?

Senior
РунитиРунити
27

Why are you interested in backend development and why did you choose this direction?

Middle+
КасперскийКасперский
27

Have you ever written programs for processing network traffic?

Middle+
КасперскийКасперский
27
/541