Some additional information ->
In graph theory and theoretical computer science, the longest path problem is the problem of finding a simple path of maximum length in a given graph. A path is called simple if it does not have any repeated vertices; the length of a path may either be measured by its number of edges, or (in weighted graphs) by the sum of the weights of its edges.
The longest path problem is NP-hard.
However, it has a linear time solution for directed acyclic graphs, which has important applications in finding the critical path in scheduling problems. But graph is acyclic it is not given.
First of all thanks to @VS ji for correcting me. Now, Determining whether there are paths(nothing is mentioned what kind of path is this) of arbitrarily large could be done in polynomial time. For any graph we have two cases -
(1) Graph contains cycle -> In this case Bellman-Ford could be used because we have to just check existence cycle.
(2) Graph does not contains cycle -> Linear time algorithm exists for this case also (as mentioned above).
So best possible Answer in provided option is (D) Part.
For more information please refer - https://en.wikipedia.org/wiki/Longest_path_problem