DEA-C01 exam dumps

DEA-C01 practice question 136 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 136

Single answer

You are designing a data pipeline for a social networking application. The application needs to recommend new friends to users based on mutual connections. Which data structure and algorithm would be the most appropriate to model the relationships and compute mutual connections efficiently?

  1. A

    Graph data structure with Breadth-First Search (BFS)

  2. B

    Tree data structure with Depth-First Search (DFS)

  3. C

    Hash table with linear probing

  4. D

    Array with binary search

Show answer and explanation

Correct answer: A

Explanation

Social networks are naturally represented as graphs, where nodes represent users and edges represent connections between them. Breadth-First Search (BFS) is a common algorithm for traversing graphs and is particularly effective for finding all neighbors of a node or mutual connections between nodes. Therefore, a graph data structure with BFS is the most appropriate choice for this scenario.

  • A. Correct.

    Graph data structures are ideal for modeling relationships between entities, such as users in a social network. Breadth-First Search (BFS) can be used to traverse the graph and find mutual connections efficiently.

  • B. Incorrect.

    Tree data structures are hierarchical and not well-suited for representing complex relationships like those in a social network. DFS is also less efficient for finding mutual connections in this context compared to BFS.

  • C. Incorrect.

    A hash table is useful for quick lookups but isn’t suitable for modeling complex relationships like mutual connections in a social network.

  • D. Incorrect.

    An array is a basic data structure that lacks the ability to represent relationships between entities, making it unsuitable for this use case.

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