Add algorithm for testing cycle in graph by given vertex