DSA Quick Revision

DSA Questions & Answers

1 What is DSA?

Data Structures and Algorithms

2 What is an algorithm?

Step by step instructions to solve a problem

3 What is Big-O notation?

Measures algorithm efficiency

4 What is O(1)?

Constant time complexity

5 What is O(n)?

Linear time complexity

6 What is array?

Ordered collection of data

7 How to add element in array?

arr.push(value)

8 How to remove element?

arr.pop()

9 What is stack?

LIFO data structure

10 What is queue?

FIFO data structure

11 What is recursion?

Function calling itself

12 What is base case?

Condition to stop recursion

13 What is searching?

Finding element in data

14 What is linear search?

Sequential search

15 What is binary search?

Search in sorted array

16 Binary search complexity?

O(log n)

17 What is sorting?

Arranging data

18 Bubble sort complexity?

O(n²)

19 What is linked list?

Nodes connected with pointers

20 What is node?

Element in linked list

21 What is tree?

Hierarchical data structure

22 What is binary tree?

Tree with max two children

23 What is BST?

Binary Search Tree

24 What is graph?

Collection of nodes and edges

25 What is BFS?

Breadth First Search

26 What is DFS?

Depth First Search

27 What is hash table?

Key value structure

28 What is dynamic programming?

Optimization technique

29 What is greedy algorithm?

Choose best option each step

30 What is recursion stack?

Memory used during recursion

31 What is divide and conquer?

Break problem into smaller parts

32 What is merge sort?

Divide and merge sorting

33 What is quick sort?

Pivot based sorting

34 What is heap?

Tree based structure

35 What is max heap?

Parent greater than children

36 What is min heap?

Parent smaller than children

37 What is graph traversal?

Visiting nodes

38 What is adjacency list?

Graph representation

39 What is adjacency matrix?

Graph matrix representation

40 What is cycle in graph?

Loop in graph

41 What is stack overflow?

Too much recursion

42 What is memoization?

Store computed results

43 What is backtracking?

Try all possibilities

44 What is subset?

Part of set

45 What is permutation?

Arrangement of elements

46 What is combination?

Selection of elements

47 What is sliding window?

Optimized subarray technique

48 What is prefix sum?

Cumulative sum array

49 What is brute force?

Try all solutions

50 Why learn DSA?

Improve problem solving and interviews

šŸ“ Your Notes