📜 ⬆️ ⬇️

Complicating the task about lists

Recently slipped the task from an interview with Microsoft, about lists: given a list, to determine whether it has a cycle.

Complicate. A list is given to determine if it has a cycle, and if so, how many elements are in the cycle. At the same time, the list is muttable (that is, it can be changed), but after completion it is necessary that the list remain unchanged.

')

Source: https://habr.com/ru/post/11627/


All Articles