2 stories

You have a directed connected graph. Write an algorithm that detects any cycle, if one exists, and returns a list of its nodes.

814 views Amin A.

A linked list is given. Write an algorithm that detects whether it's a singly linked list or a circularly linked list.

716 views Amin A.