0Comparisons
0Swaps
ReadyStatus
0 msTime
Bubble Sort: Compare two neighbors, swap if the left one is bigger. The largest element moves to the end.
bubbleSort(arr):
for i in range(n):
for j in range(n-i-1):
if arr[j] > arr[j+1]:
swap(arr[j], arr[j+1])
Stack is empty. Press Push to add.
Stack = LIFO ā Last In, First Out. Like a stack of plates ā the last plate placed is the first one removed.
Queue is empty. Press Enqueue to add.
Queue = FIFO ā First In, First Out. Like a ticket line ā whoever comes first, goes first.
Linked List is empty.
Linked List: Each node has a Value + address of the Next node. No fixed size like an Array.
š³ Binary Search Tree
Left me chhota, Right me bada. Inorder = Sorted order me aayega.
Tree empty hai. Value daal ke Insert dabao.
Inorder: Left ā Root ā Right (Sorted). Preorder: Root ā Left ā Right. Postorder: Left ā Right ā Root.
šøļø Graph - BFS / DFS
Graph: A-B-C-D-E connected hai. BFS = Level by level, DFS = Deep tak jao.
Press BFS or DFS to see traversal.
BFS uses Queue. DFS uses Stack / Recursion. Interview me sabse zyada pucha jata hai.
š§ DSA Quiz - Practice Mode
Score: 0 / 10
Answer 10 questions. Each correct answer = +20 points. Perfect for interview revision.
Question 0 / 10
šÆ Interview Tip
Interviewers want logic, not just names. Watch the animation, understand the logic first, then memorize the code. Bubble = O(n²), Merge / Quick = O(n log n), Binary Search = O(log n).