Question

    In a depth-first traversal of a tree or graph, what

    data structure is typically used to keep track of nodes to be visited next?
    A Queue Correct Answer Incorrect Answer
    B Stack Correct Answer Incorrect Answer
    C Priority Queue Correct Answer Incorrect Answer
    D Linked List Correct Answer Incorrect Answer

    Solution

    Stack

    Practice Next

    Relevant for Exams: