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
    E None of the mentioned Correct Answer Incorrect Answer

    Solution

    The correct answer is B

    Practice Next
    ×
    ×