🧱

Data Structures

95 cards · 🇺🇸 English

Arrays, linked lists, trees, graphs, hash tables and their core operations.

Study all 95 cards for free

Flashcards, quizzes, pixel-art games and a daily review that remembers for you.

Study this deck free

Try the first 10 cards

1 / 10
Question

Data structure

Knew itLearning

Tap the card for the answer · swipe right if you knew it, left if not

Already have an account? Sign in

Cards

  1. 1Data structure
    A data organization and storage format chosen for efficient access to data
  2. 2Abstract Data Type (ADT)
    A data type defined indirectly by the operations that may be performed on it and their mathematical properties
  3. 3How does an ADT relate to a data structure?
    The ADT defines the logical form; the data structure implements the physical form
  4. 4Why are efficient data structures important?
    They are key to designing efficient algorithms and managing large amounts of data
  5. 5Array
    A collection of elements in a specific order, typically all of the same type, accessed by integer indices
  6. 6How are array elements typically stored in memory?
    In contiguous memory locations
  7. 7Advantage of arrays
    Fast random access and modification (constant time with index)
  8. 8Can arrays be resizable?
    Yes, they can be fixed-length or resizable (dynamic)
  9. 9Linked list
    A linear collection where each node contains a value and a pointer to the next node
  10. 10Principal advantage of a linked list over an array
    Values can be efficiently inserted and removed without relocating the rest of the list
  11. 11Disadvantage of linked lists
    Random access to an element is slower than in arrays (requires traversal)
  12. 12Record (or struct)
    An aggregate data structure containing other values in fixed number and sequence, typically indexed by names
  13. 13Elements of a record called
    Fields or members
  14. 14Hash table
    A data structure that provides fast retrieval of values based on keys using a hashing function
  15. 15Average time complexity for access in a hash table
    O(1) - constant time
  16. 16Hash collisions
    When two different keys map to the same index in a hash table
  17. 17Two techniques to handle hash collisions
    Chaining and open addressing
  18. 18Graph
    A collection of nodes (vertices) connected by edges, representing relationships
  19. 19Graphs used to model
    Social networks, computer networks, transportation networks, and relationships between entities
  20. 20Two types of graphs
    Directed and undirected
  21. 21Two main graph traversal algorithms
    Breadth-first search (BFS) and depth-first search (DFS)
  22. 22Stack
    An abstract data type with push and pop operations following LIFO (Last In, First Out)
  23. 23Push operation
    Adds an element to the top of the stack
  24. 24Pop operation
    Removes and returns the topmost element from the stack
  25. 25What principle does a stack follow?
    LIFO - Last In, First Out
  26. 26Queue
    An abstract data type with enqueue and dequeue operations following FIFO (First In, First Out)
  27. 27Enqueue operation
    Adds an element to the rear of the queue
  28. 28Dequeue operation
    Removes and returns an element from the front of the queue
  29. 29What principle does a queue follow?
    FIFO - First In, First Out
  30. 30Tree
    A hierarchical data structure with nodes connected by edges, with one root node

And 65 more cards. Study the whole deck free

Articles about this deck

More Programming decks

See all
Study all 95 cards free