Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
27 views2 pages

DSA Quick Revision Sheet

The document is a quick revision sheet covering fundamental data structures and algorithms, including arrays, linked lists, stacks, queues, searching, sorting, trees, graphs, hashing, dynamic memory allocation, Polish notation, and sparse matrices. Each section provides a brief description, examples, and key operations associated with the data structures and algorithms. It serves as a concise reference for understanding core concepts in data structures and algorithms.

Uploaded by

Prachi Narula
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views2 pages

DSA Quick Revision Sheet

The document is a quick revision sheet covering fundamental data structures and algorithms, including arrays, linked lists, stacks, queues, searching, sorting, trees, graphs, hashing, dynamic memory allocation, Polish notation, and sparse matrices. Each section provides a brief description, examples, and key operations associated with the data structures and algorithms. It serves as a concise reference for understanding core concepts in data structures and algorithms.

Uploaded by

Prachi Narula
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

DSA Quick Revision Sheet

1. Array
- Collection of elements in contiguous memory.
- Fixed size.
- Example: int arr[5] = {1, 2, 3, 4, 5};

2. Linked List
- Nodes linked using pointers.
- Dynamic size.
- Types: Singly, Doubly, Circular.
- Example: 10 -> 20 -> 30 -> NULL

3. Stack
- LIFO structure (Last In First Out).
- Operations: push, pop, peek.
- Example: Plates stacked one above another.

4. Queue
- FIFO structure (First In First Out).
- Operations: enqueue, dequeue.
- Example: Waiting line in a store.

5. Searching
- Linear Search: Check each element one by one.
- Binary Search: Works on sorted array, divide and conquer.

6. Sorting
- Selection Sort: Find minimum element and swap.
- Merge Sort: Divide array, sort halves, merge.
- Quick Sort: Pick pivot, partition array.
7. Tree
- Hierarchical structure with nodes.
- Root node at top.
- Types: Binary Tree, BST, AVL, Heap.
- Traversals: Inorder, Preorder, Postorder.

8. Graph
- Collection of vertices (nodes) and edges.
- Types: Directed, Undirected.
- Traversals: BFS (Queue), DFS (Stack/Recursion).

9. Hashing
- Map keys to indexes using hash function.
- Handles collisions by chaining or open addressing.

10. Dynamic Memory Allocation


- Memory allocated at runtime using malloc(), calloc(), free().
- Used in linked lists, trees, etc.

11. Polish Notation


- Prefix form: Operator before operands (+ 3 4).
- Reverse Polish: Postfix form (3 4 +).
- Used in expression evaluation.

12. Sparse Matrix


- Mostly zeros, stored efficiently by saving only non-zero values.
- Types: COO, CSR, CSC.

You might also like