0% found this document useful (0 votes)
4 views3 pages

DSA Cheat Sheet for Programming Interviews

The document is a DSA CheatSheet that covers essential topics in Data Structures and Algorithms, including arrays, strings, linked lists, stacks, queues, recursion, searching, and sorting algorithms. It also explains the importance of DSA in programming and interviews, along with time and space complexity basics. Additionally, it includes mathematical concepts relevant to DSA such as prime numbers and modular arithmetic.

Uploaded by

Mohd Aktharpasha
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)
4 views3 pages

DSA Cheat Sheet for Programming Interviews

The document is a DSA CheatSheet that covers essential topics in Data Structures and Algorithms, including arrays, strings, linked lists, stacks, queues, recursion, searching, and sorting algorithms. It also explains the importance of DSA in programming and interviews, along with time and space complexity basics. Additionally, it includes mathematical concepts relevant to DSA such as prime numbers and modular arithmetic.

Uploaded by

Mohd Aktharpasha
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

DSA

CheatSheet
n
ta
he
hc
rs
da
A
TABLE OF CONTENTS
1. Introduction
What is DSA?
Importance of DSA in Programming and Interviews
Time and Space Complexity Basics
Big O Notation Explained

2. Mathematics for DSA


Prime Numbers
GCD/LCM (Euclidean Algorithm)
Modular Arithmetic
Sieve of Eratosthenes
Fast Exponentiation

n
Bit Manipulation Basics

3. Arrays
Introduction to Arrays
ta
he
Traversal, Insertion, Deletion
Prefix Sum & Sliding Window
Two Pointer Technique
hc

Kadane’s Algorithm (Max Subarray Sum)


Sorting Techniques (Bubble, Selection, Insertion, Merge, Quick)
rs

4. Strings
String Basics and Operations
Palindrome Check
da

Anagram Check
String Matching Algorithms (Naive, KMP, Rabin-Karp)
Pattern Matching
A

Z-Algorithm
Manacher’s Algorithm (Advanced)

5. Linked Lists
Singly Linked List
Doubly Linked List
Circular Linked List
Operations: Insert, Delete, Reverse
Detect Cycle (Floyd’s Algorithm)
Intersection Point, Merge Two Lists
TABLE OF CONTENTS
6. Stacks
Stack Basics
Push/Pop Operations
Infix to Postfix/Prefix
Valid Parentheses
Next Greater Element
Min Stack

7. Queues
Queue Basics
Circular Queue
Deque (Double Ended Queue)

n
Priority Queue / Heap
Stack using Queue and vice versa

8. Recursion and Backtracking


ta
he
Recursion Basics
Factorial, Fibonacci
Tower of Hanoi
hc

N-Queens Problem
Sudoku Solver
Subset/Permutation/Combination Generation
rs

9. Searching Algorithms
Linear Search
da

Binary Search
Binary Search on Answer
Search in Rotated Sorted Array
A

Lower Bound / Upper Bound

10. Sorting Algorithms


Bubble, Selection, Insertion
Merge Sort
Quick Sort
Heap Sort
Counting Sort, Radix Sort, Bucket Sort

You might also like