Skip to content
Log in · soon

Data structures and algorithms for IT Officer

What the subject covers, the key topics, how it has been asked, common mistakes and a two-week plan.

  • 8 min read
  • 7 topic groups
  • 48 terms in the glossary
  • 8 topics

IBPS publishes no official syllabus; this list is based on previous papers.

What the subject covers

  • Data structures

    Ways to organise data in memory (arrays, lists, trees, graphs, hash tables).

  • Algorithms

    Step-by-step methods that work on them (searching, sorting, traversing, optimising).

The exam tests whether you know how each structure behaves, how fast each algorithm is (Big-O), and whether you can trace small examples by hand.

Quick revision

Tap a term to open its definition.

Key topics

Complexity

Big-O, Ω and Θ, the common orders, and typical recurrences.
Big-O, Ω, Θ
NotationBound
Big-OAn upper bound
ΩA lower bound
ΘA tight bound

Common orders, from fastest-growing down: n!, 2ⁿ, n², n log n, n, log n, 1.

Typical recurrences
RecurrenceGivesAs in
T(n) = 2T(n/2) + nO(n log n)Merge sort
T(n) = T(n/2) + 1O(log n)Binary search

Linear structures

Arrays and linked lists, stacks and queues, expression conversion, linear vs non-linear.
Arrays and linked lists
ComparedArrayLinked list
AccessO(1) access by indexAccess costs O(n)
InsertInserting in the middle costs O(n)Inserts in O(1) once you hold the node

Variants: singly, doubly and circular lists.

Stack

A stack is LIFO (push, pop). It is used for function calls, undo, and expression conversion and evaluation.

Queue

A queue is FIFO. Variants: circular queue, deque, priority queue.

Expression conversion with a stackPostfix
infix    a + b * c
postfix  a b c * +

Infix becomes postfix this way because * binds tighter.

Evaluate postfix left to right: push operands, and on each operator pop two (the right operand first, then the left: for a b − compute a − b) and push the result.

Linear vs non-linear

Arrays, lists, stacks and queues are linear. Trees and graphs are non-linear.

Trees

Binary tree facts, traversals, BST, AVL trees, heaps, and B/B+ trees, tries and spanning trees.

Binary tree facts: at most 2ˡ nodes on level l (root = level 0); at most 2ʰ⁺¹ − 1 nodes in a tree of height h; with n nodes there are n − 1 edges.

Traversals
TraversalOrder
PreorderRoot, left, right
InorderLeft, root, right
PostorderLeft, right, root
Level orderUses a queue

Binary search tree (BST)

Left < node < right. Search, insert and delete are O(h): O(log n) when balanced, O(n) when skewed, for example after inserting sorted keys.

AVL tree

A self-balancing BST: each node's balance factor (left height − right height) is −1, 0 or +1. Insertions are fixed with LL, RR, LR and RL rotations.

Fewest nodes in an AVL tree of height hFormula

The fewest nodes an AVL tree of height h can have follows

N(h) = N(h−1) + N(h−2) + 1
N(0) = 1, N(1) = 2   (a single node has height 0)
so N(2) = 4, N(3) = 7, N(4) = 12

Heap

A complete binary tree stored in an array. In a max-heap every parent ≥ its children.

Heap indexes and costs: with 0-based indexes, the children of i are 2i + 1 and 2i + 2. Insert and delete-max are O(log n); building a heap is O(n).

Also: B and B+ trees (see DBMS), tries (prefix search), spanning trees.

Graphs

Representation, BFS and DFS, shortest paths, minimum spanning trees and topological sort.
Representation: adjacency matrix vs list
ComparedAdjacency matrixAdjacency list
Space it takesO(V²)O(V + E)
What it givesO(1) edge lookupSuits sparse graphs
Traversal: BFS vs DFS
ComparedBFSDFS
UsesA queueA stack or recursion
AlsoFinds shortest paths in unweighted graphsnot stated

Both are O(V + E) with adjacency lists.

Shortest paths
AlgorithmWhat to know
DijkstraNon-negative weights only
Bellman-FordHandles negative edges and detects negative cycles
Floyd-WarshallAll pairs, O(V³)

Minimum spanning tree (MST)

Prim grows from a vertex; Kruskal adds the cheapest edges that don't form a cycle (union-find). An MST of V vertices has V − 1 edges.

Topological sort

Topological sort orders the vertices of a directed acyclic graph (DAG).

Searching and sorting

The sorting complexity table, selection, insertion and quick sort, linear and binary search.
Sorting: time, extra space, stability
AlgorithmBestAverageWorstExtra spaceStable
Bubble (with early exit)nn²n²1Yes
Selectionn²n²n²1No
Insertionnn²n²1Yes
Mergen log nn log nn log nnYes
Quickn log nn log nn²log n average (n worst case)No
Heapn log nn log nn log n1No

All complexities in the table are O(·).

Selection sort

Selection sort makes at most n − 1 swaps, the fewest among the simple in-place sorts.

Merge, heap and selection sort take the same time in every case.

Insertion sort

Insertion sort is fast on nearly sorted data.

Quick sort

Quick sort's worst case comes from bad pivots, for example an already sorted array with the first element as pivot.

Hashing

Hash functions, load factor, chaining and open addressing.

Hash function

Basics: a hash function maps a key to a slot.

Load factor

The load factor α = number of stored keys ÷ number of slots.

Collision handling: chaining vs open addressing
MethodHow
ChainingKeeps a list per slot
Open addressingProbes for another slot: linear probing (causes primary clustering), quadratic probing, or double hashing

Algorithm design

Divide and conquer, greedy, dynamic programming and backtracking.
Algorithm design techniques
TechniqueIdeaExamples
Divide and conquerSplit, solve the parts, combineMerge sort, quick sort, binary search
GreedyTake the best local choice each stepKruskal, Prim, Huffman coding, fractional knapsack
Dynamic programmingOverlapping subproblems plus optimal substructure0/1 knapsack, longest common subsequence (O(mn)), longest increasing subsequence (O(n²) with the classic double loop, O(n log n) with binary search)
Backtrackingnot statedN-queens, subsets
Memoization vs tabulation
ComparedMemoizationTabulation
DirectionTop-downBottom-up
HowCaches the results of recursive calls so each subproblem is solved onceFills a table

How it is asked

Official

From the official IBPS documents

These are the facts about the format from the official IBPS documents:

  • Professional Knowledge in the Mains has 50 questions for 100 marks in 40 minutes (2 marks each, −0.50 for a wrong answer).
  • Each question has five options.

Sources: IBPS official notification CRP SPL-XVI (1 Jul 2026); IBPS Information Handout, Online Main Exam CRP SPL-XVI, “notification §D; handout, Professional Knowledge sample question”

Not official

From memory-based papers (unofficial)

IBPS doesn't publish past papers. Based on memory-based papers shared by candidates (unofficial) for two previous IT Officer Mains exams (January 2023 and December 2024; possibly incomplete), data-structure questions were mostly short and exact:

  • Trace a small example: the inorder traversal of a BST built from a given insertion order, converting an infix expression to postfix, and the height of an AVL tree with a given number of nodes.
  • Complexity and properties: which sort takes the same time in every case, which in-place sort makes the fewest swaps, the time complexity of a DP solution, and what memoization is for.
  • Definitions: what a hash table's load factor means, which structure is not linear, and which method is an example of divide and conquer.

We don't give a number of questions, because IBPS publishes no weightage.

Common mistakes

Our suggestion

Two-week study plan

A suggestion. Adjust it to your own pace.

  1. Day 1

    Big-O, recurrences

    Practice: Rank 10 functions by growth; solve 5 recurrences

  2. Days 2–3

    Arrays, linked lists, stacks, queues

    Practice: Infix → postfix and postfix evaluation, 10 a day

  3. Days 4–6

    Binary trees, traversals, BST, AVL rotations, heaps

    Practice: Build a BST from a key list; write all 4 traversals; insert into an AVL with rotations

  4. Days 7–8

    Graphs: representation, BFS, DFS, Dijkstra, MST

    Practice: Run each algorithm by hand on a 6-vertex graph

  5. Days 9–10

    Searching and sorting

    Practice: Fill the complexity table from memory; trace one pass of each sort

  6. Day 11

    Hashing

    Practice: Insert keys with linear probing and with chaining

  7. Day 12

    Divide and conquer, greedy, DP, backtracking

    Practice: Classify 20 problems by technique

  8. Days 13–14

    Mixed revision

    Practice: Timed set of 25 questions in 20 minutes; review every wrong answer

Show the plan as a table
Two-week study plan
DaysFocusPractice
1Big-O, recurrencesRank 10 functions by growth; solve 5 recurrences
2–3Arrays, linked lists, stacks, queuesInfix → postfix and postfix evaluation, 10 a day
4–6Binary trees, traversals, BST, AVL rotations, heapsBuild a BST from a key list; write all 4 traversals; insert into an AVL with rotations
7–8Graphs: representation, BFS, DFS, Dijkstra, MSTRun each algorithm by hand on a 6-vertex graph
9–10Searching and sortingFill the complexity table from memory; trace one pass of each sort
11HashingInsert keys with linear probing and with chaining
12Divide and conquer, greedy, DP, backtrackingClassify 20 problems by technique
13–14Mixed revisionTimed set of 25 questions in 20 minutes; review every wrong answer

Glossary A–Z

48 terms

A

  • Adjacency listSee Representation: adjacency matrix vs list.
  • Adjacency matrixSee Representation: adjacency matrix vs list.
  • AVL treeA self-balancing BST: each node's balance factor (left height − right height) is −1, 0 or +1. Insertions are fixed with LL, RR, LR and RL rotations.

B

C

  • ChainingSee Collision handling: chaining vs open addressing.

D

F

G

  • GreedySee Algorithm design techniques.

H

  • Hash functionBasics: a hash function maps a key to a slot.
  • HeapA complete binary tree stored in an array. In a max-heap every parent ≥ its children.
  • Heap sortSee Sorting: time, extra space, stability.

I

K

  • KruskalSee Minimum spanning tree (MST).

L

M

  • Max-heapSee Heap.
  • MemoizationSee Memoization vs tabulation.
  • Merge sortSee Sorting: time, extra space, stability.
  • Minimum spanning tree (MST)Prim grows from a vertex; Kruskal adds the cheapest edges that don't form a cycle (union-find). An MST of V vertices has V − 1 edges.
  • MSTSee Minimum spanning tree (MST).

O

P

Q

  • QueueA queue is FIFO. Variants: circular queue, deque, priority queue.
  • Quick sortQuick sort's worst case comes from bad pivots, for example an already sorted array with the first element as pivot.

S

  • Selection sortSelection sort makes at most n − 1 swaps, the fewest among the simple in-place sorts.
  • StackA stack is LIFO (push, pop). It is used for function calls, undo, and expression conversion and evaluation.

T

Not official · based on previous papers

DSA topics

8 topics. Practice questions: 0 so far, 2-mark questions coming soon.

DSA FAQ

Do I need to write code for data structures in this exam?

No. The exam is multiple choice. You need to know how the structures behave and be able to trace small examples by hand: traversals, conversions and complexities.

Which sorting algorithms should I know?

Bubble, selection, insertion, merge, quick and heap sort, with best, average and worst-case times, extra space, and whether each is stable.

Is dynamic programming asked?

In the memory-based papers we read (shared by candidates, unofficial), yes, at the level of concepts: what memoization does and the complexity of a classic DP solution. Know the idea and a few standard examples.

How many data-structure questions come in the Mains?

IBPS doesn't say. Professional Knowledge has 50 questions in total for 100 marks; the split across subjects isn't published.

Other subject guides