Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Tries

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

10.

Tries

● Definition: A tree-like data structure that stores a dynamic set of strings, where each
node represents a character of a string.
● Properties:
○ Efficient Searching: Useful for fast retrieval of words.
○ Commonly used in search engines: To enhance word search speed.
● Use Cases: Autocomplete features, spell checking, and IP routing.

11. Graphs - Advanced Concepts

● Search Techniques:
○ Depth-First Search (DFS): Explores as far as possible along each branch
before backtracking.
○ Breadth-First Search (BFS): Explores all the neighbors at the present depth
prior to moving on to nodes at the next depth level.
● Use Cases: Network analysis, social network optimization, and pathfinding
algorithms.

12. Bloom Filters

● Definition: A probabilistic data structure that is used to test whether an element is a


member of a set, with a small probability of false positives.
● Properties:
○ Space Efficient: Uses very little memory.
○ False Positive Rate: Can indicate that an element is present when it is not.
● Use Cases: Fast membership queries, large-scale data processing.

4. Queues

● Definition: A collection of elements that follows the First In, First Out (FIFO)
principle.
● Types:
○ Simple Queue: Standard FIFO operation.
○ Circular Queue: Connects the end of the queue back to the front.
○ Priority Queue: Elements are served based on priority.
● Use Cases: Task scheduling, handling requests in servers.

5. Trees

● Definition: A hierarchical data structure consisting of nodes, with a root node and
child nodes.
● Types:
○ Binary Tree: Each node has at most two children.
○ Binary Search Tree (BST): Left child < Parent < Right child.
○ Balanced Trees (e.g., AVL, Red-Black Tree): Maintain height balance for
efficient operations.

1. Arrays

● Definition: A collection of elements identified by index or key.


● Properties: Fixed size, elements of the same type, allows random access.
● Use Cases: Storing data in a linear format, implementing other data structures like
stacks and queues.

2. Linked Lists

● Definition: A linear data structure where elements are stored in nodes, each pointing
to the next.
● Types:
○ Singly Linked List: Each node points to the next node.
○ Doubly Linked List: Each node points to both the next and the previous
node.
● Use Cases: Dynamic memory allocation, insertion and deletion of elements.

3. Stacks

● Definition: A collection of elements that follows the Last In, First Out (LIFO)
principle.
● Operations:
○ Push: Add an element to the top.
○ Pop: Remove the top element.
● Use Cases: Undo functionality in applications, parsing expressions.

You might also like