Java Plus Dsa Sheet
Java Plus Dsa Sheet
Java Basics
Maths in DSA
Bits Manipulation
Arrays
Searching Algorithms
Matrix
String Manipulation
Stack
Queue
Collections Framework
Two Pointers
Recursion
Linked List
String Manipulation
Hashing
Sliding Window
Trees
Heap & Priority Queue
Tries
Graphs
Greedy Algorithms
Bonus
Java Plus DSA Sheet By Shashwat Tiwari
Subtopics
Programming Language and Memory Management
Flow of a program
Control Statements
Functions in Java
Mini Project -1
Arrays in Java
Searching Algorithms - 1
Searching Algorithms - 2
Questions on Matrix - 2
Questions on Matrix - 3
More on Strings
Playing with String
Q. Check parenthesis
Q. Remove minimum brackets to balance string
Q. Add minimum brackets to balance string
Q. Swap minimum brackets to balance string
Q. Swap adjacent brackets to balance string
Q. Asteroid Collision
Q. Stock Span Problem
Q. Next Greater element
Q. Next Smaller element
Q. Next Greater / Smaller element in circular array
Q. Largest Rectangle in Histogram + Previous smaller element
Q. Max Rectangle
Q. Longest Valid Parentheses
Queue Data Structure
Recursion - I
Recursion - II
Recursion - III
Q. Longest Pallindrome
Q. Find all Anagrams
Q. K-Anagrams
Q. Roman to Integer
Q. First Repeated word in a string
Q. Isomorphic String checker
Hashing
AVL Tree
TreeMap Collections
Heap
Graph Introduction
Introduction [Link]
Need of Data Structure and Algorithms
Data and Object in real world
Need for a framework
What is collection framework?
Modules Vs Framework Vs Library Vs Package
How to Import Collections Framework
Hierarchy of Collections Framework - Interfaces & Classes
Functions in Collection Interface
Java Generics and AutoBoxing
List Interface
ArrayList & its functions
How to Iterate your List using Iterator
Internal Working of ArrayList
Sorting using Comparator
Sorting based on Custom Comparator
How to Iterate your List using ListIterator
Time Complexity of ArrayList
LinkedList & its functions
ArrayList VS LinkedList
Time Complexity of LinkedList
Vectors and their use
Stack & its functions
Time Complexity of Stack
Queue & its functions
Queue using LinkedList
Queue using ArrayDeque
Deque Interface using ArrayDeque & LinkedList
PriorityQueue Implementation of Queue
Map Interface
Hashing Concept
How Map uses Hashing Concept
HashMap & its functions
How to traverse a Map using Entry Interface
Map using LinkedHashMap
Map using TreeMap
BST
Self Balanced BST or Red-Black Tree
TreeMap & its functions
Set Interface
HashSet
How HashSet works Internally
LinkedHashSet
TreeSet
TBD
TBD
TBD
TBD
TBD
TBD
TBD
Leap of Faith
Q. Tower of Hanoi
Q. Count ways in a Matrix
Notations
Recurrence Relation
Trick
Q. Rat in a Maze
Q. All permutations
Q. Pallindrome Partitioning
Q. Letter Combination of a Phone Number
Q. Print Subdequences of a String
Q. Subsequences with sum equal K
Q. Combination Sum - I
Q. Combination Sum - II
Q. Combination Sum - III
Q. Combination Sum - IV
Q. Number of islands
Q. Knights tour problem
Q. N Queens problem
Q. Suduko Solver
Q. Josephus problem - Kill in circle
Binary Search using recursion
[Link]
Intro to linked list Data Structure
Types of linked list
All operations of Single linked list
Time Complexity
Applications of linked list
Implementation of linked list data structure
[Link]
Intro to Doubly linked list
All operations and their time complexity
Implementation of linked list
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
TBL
TBD
TBD
TBD
TBD
TBD
TBD
TBD
TBD
TBD
[Link]
Components of Hashing
How hashing works?
Types of Hash Functions
Collisions
Collision Resolution Techniques - Separate chaining
Collision Resolution Techniques - Open Addressing
Load Factor
Rehashing
Applications and Advantages
[Link]
What is hashmap?
How to use custom key-value pair
[Link]
All Methods
Hashcode function
Rehashing
[Link]
[Link]
[Link]
[Link]
what is hashset data structure
Usage of map keys
Set Iterator
[Link]
[Link]
Q. Check if subarray with K sum Exists or Not
Q. Find the starting and ending index of K sum subarray
Q. Find the maximum length subarray with K sum
Q. Find the minimum length subarray with K sum Homework
Q. Count the total subarrays with sum K
Q. Find largest subarray with 0 sum Homework
[Link]
[Link]
TBD
[Link]
pair are in different rows TBD
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
Linear Data Structure
Non Linear Data Structure
[Link]
What is a tree Data Structure.
Types of trees.
Binary Trees.
N-ary Trees.
Ternary Trees.
Non Linear Data Strcuture.
Hierarical Data Structure.
Properties of a Tree Data Structure.
Neighbour in Tree.
Siblings in Tree.
Cousin in Tree.
Depth of a Tree.
1Height of a Tree.
Child of a node in tree.
Parent of a node in tree.
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
Q. Size of Binary Tree [Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
TBD
TBD
TBD
TBD
[Link]
[Link]
TBD
TBD
TBD
TBD
[Link]
1. AVL Trees
2. Balanced Trees
3. Insert in AVL Tree
4. Delete in AVL Tree
5. Balance factor of AVL Tree
6. AVL Tree rotations
7. LL
8. RR
9. LR
10. RL
[Link]
[Link]
1. Heaps
2. Heapify
3. Heapsort
4. Min Heap
5. Max Heap
6. Increase Key
7. Decrease Key
8. Insert in Heap
9. Delete from Heap
10. build heap from array
11. Complete Tree
[Link]
1. Priority Queue in Java collections
2. Priority Queue on custom classes.
3. [Link]()
4. dsa playlist
5. Equate objects in pq
[Link]
[Link]
[Link]
[Link]
[Link]
TBD
TBD
TBD
TBD
Introduction to Trie
Implement a Trie in java
Insert, Search and delete operations
Q. Longest String with All prefixes
Q. Number of Distinct substrings in string
Q. Power Set
Q. Maximum XoR of two Numbers in an Array
[Link]
1. Introduction to graphs
2. Directed Graph
3. UnDirected Graph
4. Weighted Graph
5. UnWeighted Graph
6. Vertex and Edges
7. Degree of a node in graph
8. In-degree and Out-degree in graphs
[Link]
1. How to represent graph in memory
2. InDegree of directed graph
3. outDegree of directed graph
4. Adjacency List
5. Adjacency Matrix
6. Degree of a graph
7. Represent Directed graph with weight
8. Represent UnDirected graph with weight
[Link]
[Link]
[Link]
1. How to traverse multiple components in a graph
2. TreeTraversal vs Graph Traversal
3. Path in a graph
4. Cycle in a graph
5. Directed Acyclic Graph (DAG)
7. Find if a path is valid or not
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
TBD
[Link]
[Link]
[Link]
TBD
TBD
TBD
TBD
TBD
TBD
TBD
TBD
TBD
TBD
TBD
TBD
Overlapping Subproblems
Optimal Substructures
TBD
TBD
TBD
TBD
TBD
TBD
TBD
TBD
TBD
TBD
TBD
TBD
TBD
TBD
TBD
TBD
268j2hk0
bJOzF5A
9X75EPI
QzcbLicY
Z9RfIJE
0Rwrubs0
8usR3rEA
nLhAxy8s
AzNuefc
ujSiOSi0
RFpGmiE
oEgSp9O4
KSd3T2g
EXbLQX1k
vLfkuSEs
exsJWlI
dKVMjeQ
CDEUzaI
BrdxJA
awmdh5NM
SvNw9Qw
QcCu8oBI
mUWmmYbY
HoQIOnAs
bhpuhbk
wrTtUQvY
Pxfc4iQ
gAlmyTkc
8D95eHM
ayNeigg
Bm-VT99A
Gl1ZKQE
cDlB1uXk
meMx3Dq0
yvtCpjsg
oWcYX2_8
AvQXIEo
eiIm59Yk
KDoVRcw
KKzn6D4E
HVGFAJY
gdPVEwCc
1eMPYzSU
1L7CPH4
x5NN2bg
bE0VznM
C10ozzw
ents that appear twice
YjtczvY
J-PwU4g
IYakYt8
YRi1tXE
AjIVnmp4
MO4MkWs
AMB3jDOU
ND7TPc0
7EYLfOY
QWpma7ug
oP25NpfQ
wSdPjVGw
Bv1KtcDM
pGf3pzI
xDsqb8OE
lksWtS4
bq5qOraY
34EgVyY
QchOMmTGY
BL4gG1s
DZU4fj4
DmhCyyuc
sbdTcey0
SZPRQXQI?si=izPej7j2qhbiKrys
u8ivr0w?si=SgzjEHke5oc_cwdk
PUgXn90?si=86tva8iOIGV5E74n
6-P3XGrg?si=A8C7Bhnk9Jw9_3Eo
yUY_LKc?si=3pWEptB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