0% found this document useful (0 votes)
24 views4 pages

DSA Algorithms and Strategies

Uploaded by

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

DSA Algorithms and Strategies

Uploaded by

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

DSA Algorithms and Strategies

I. Core Algorithms:

Sorting Algorithms:

Bubble Sort

Insertion Sort

Selection Sort

Merge Sort

Quick Sort

Heap Sort

Counting Sort

Radix Sort

Bucket Sort

Searching Algorithms:

Linear Search

Binary Search

Depth-First Search (DFS)

Breadth-First Search (BFS)

Graph Algorithms:

Dijkstra's Algorithm

Bellman-Ford Algorithm

Floyd-Warshall Algorithm

Prim's Algorithm

Kruskal's Algorithm

Topological Sort

Cycle Detection
Strongly Connected Components (Kosaraju's, Tarjan's)

String Algorithms:

Knuth-Morris-Pratt (KMP) Algorithm

Boyer-Moore Algorithm

Rabin-Karp Algorithm

Trie (Prefix Tree)

Suffix Tree/Suffix Array

Regular Expression Matching

Geometric Algorithms:

Convex Hull

Line Intersection

Closest Pair of Points

II. Problem-Solving Strategies/Patterns:

Two-Pointer Technique:

Efficiently traverses data structures (arrays, linked lists).

Used for finding pairs, reversing arrays, cycle detection.

Sliding Window Technique:

Processes contiguous sub-arrays/sub-strings.

Finds maximum/minimum sums, averages, or patterns.

Recursion and Backtracking:

Solves problems by breaking them into smaller subproblems.

Explores all possible solutions (permutations, combinations).


Divide and Conquer:

Divides problems into independent subproblems.

Recursively solves subproblems and combines results.

Greedy Approach:

Makes locally optimal choices for global optimization.

Used in activity selection, knapsack problems, Huffman coding.

Dynamic Programming (DP):

Solves overlapping subproblems by storing and reusing results.

Optimizes recursive solutions (Fibonacci, LCS, knapsack).

Bit Manipulation:

Performs efficient operations on integers at the bit level.

Used in subset generation, power of 2 checks, counting set bits.

III. Additional Considerations:

Data Structures:

Arrays, Linked Lists, Stacks, Queues, Trees, Graphs, Hash Tables, Heaps,
Tries.

Time and Space Complexity Analysis:

Understanding the efficiency of algorithms.

Problem Decomposition:

Breaking down complex problems into smaller, manageable parts.

Edge Case Handling:


Ensuring algorithms work correctly for all possible inputs.

You might also like