DEA-C01 exam dumps

DEA-C01 practice question 139 of 550

AWS Certified Data Engineer - Associate. Associate level, Amazon Web Services. Free question with the correct answer and a full explanation.

DEA-C01 Question 139

Single answer

A social media platform is using Amazon Neptune to store and analyze its user relationships. The platform needs to find the shortest path between two users to recommend connections. Which data structure and algorithm combination would be most appropriate to solve this problem in Amazon Neptune?

  1. A

    Graph data structure with Dijkstra's algorithm

  2. B

    Tree data structure with Depth-First Search (DFS)

  3. C

    Graph data structure with Breadth-First Search (BFS)

  4. D

    Tree data structure with Binary Search

Show answer and explanation

Correct answer: A

Explanation

The problem involves finding the shortest path between two users in a social media network, which is best represented as a graph. Amazon Neptune is optimized for graph queries, and Dijkstra's algorithm is a well-suited algorithm for finding the shortest path in a weighted graph. Other options either use inappropriate data structures or algorithms that do not solve the problem effectively.

  • A. Correct.

    Correct. Graph data structures are ideal for representing relationships or connections, and Dijkstra's algorithm is widely used to find the shortest path between nodes in a graph. Amazon Neptune supports graph queries that can utilize such algorithms.

  • B. Incorrect.

    Incorrect. A tree data structure is not suitable for representing all user relationships in a social media network since a tree imposes a hierarchical structure without cycles, unlike a graph.

  • C. Incorrect.

    Incorrect. While BFS can find the shortest path in an unweighted graph, it is not optimal for weighted graphs, which is a common scenario in real-world applications. Dijkstra's algorithm is better suited for weighted graphs.

  • D. Incorrect.

    Incorrect. Binary Search is used for searching in sorted datasets, and a tree data structure does not support arbitrary relationships between users like a graph does.

Timed practice exam

Take a DEA-C01 practice test under exam conditions

65 questions in 130 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam