Last updated: ·2025 advertisement

SEBI Grade A IT Notes and Study Material

Short revision notes for all 12 IT subjects, free to read here with no account. Each subject has SEBI's marks, the key ideas, a worked example or comparison, a sample question and what to practise next. This page is part of our SEBI Grade A IT preparation guide.

What is free, and what may need the course

  • Free on this page: every summary, example and sample question below. You don't need an account. We wrote these for this page, and they are not copies of the library's PDFs.
  • In the PDF library: some files are free and some need the course. When we checked signed out on 4 November 2026, 15 of 30 files were labelled Free and 15 were labelled Pro. Labels can change, so the library shows the current one.
  • Mock tests: some are free and some need the course, and free tests ask you to sign in first.

Browse by subject

All 12 subjects, with their marks

Marks are from SEBI's 2025 advertisement, the latest SEBI has published. SEBI labels these weights indicative only, and the next advertisement can change them.

Not sure where to begin? Our 60-day SEBI study plan puts these subjects in order by marks. The syllabus and exam pattern guide has SEBI's full topic list, and the Phase II preparation guide goes further on code reading. We ran every program shown below and show what it printed, with SQL results laid out for reading.

Phase I: 30 marks

Programming concepts (Java, C, C++)

The largest topic in the Phase I IT paper. Tracing code by hand is the skill to build here, and it carries into Phase II.

Key ideas

  • Scope is where a name can be used. Lifetime is how long its storage lasts. A C static local variable has block scope but lasts the whole program.
  • Static scoping finds a free variable from where the function is written. Dynamic scoping finds it from whoever called the function. C, C++ and Java use static scoping.
  • Binding happens at compile time for overloads, Java static and private methods and non-virtual C++ functions. It happens at run time for overridden Java methods and C++ virtual functions.
  • C passes by value only, and a pointer parameter is a copied address. C++ adds references with &. Java also copies the value, and for an object that value is a reference.
  • Every recursive function needs a base case. Recursion to depth n uses O(n) stack. A tail call can be rewritten as a loop.
  • Java finally runs after try and catch, even when they return. Catch a subclass before its superclass, or the code does not compile.
  • A subclass constructor runs its superclass constructor first. C++ destructors run in the reverse order.
  • Functional programming treats functions as values and avoids changing state. Logic programming, as in Prolog, states facts and rules, then answers queries by unification and backtracking.

What to practise next

  • Trace 10 short programs on paper, then run them to check.
  • Rewrite one recursive function as a loop.
  • Write a small class hierarchy with constructors and one try, catch, finally block.

Worked example: what parameter passing really does in Java

Java

class Box { int v = 1; }

public class Main {
    static void change(Box b) {
        b.v = 2;
        b = new Box();
        b.v = 3;
    }

    public static void main(String[] args) {
        Box x = new Box();
        change(x);
        System.out.println(x.v);
    }
}

What it printed

2

The method gets a copy of the reference. b.v = 2 changes the caller's object. b = new Box() moves only the copy, so the 3 goes to a different object.

Sample question, written by us

What does this Java program print?

Java

public class Main {
    public static void main(String[] args) {
        int x = 5;
        int y = x++ + ++x;
        System.out.println(x + " " + y);
    }
}

Answer: 7 12. x++ gives 5 and makes x 6. ++x makes x 7 and gives 7. So y is 5 + 7.

Phase I: 10 marks

Database concepts

Phase I only. Much of this can be worked out on paper: keys, normal forms and schedules all follow rules.

Key ideas

  • A super key identifies a row. A candidate key is a minimal super key. The primary key is the candidate key you choose. A foreign key points to a key in another table.
  • ER to tables: a many-to-many relationship becomes its own table. In one-to-many, the foreign key goes on the many side. A weak entity borrows its owner's key.
  • Selection (σ) picks rows. Projection (π) picks columns and drops duplicates. Join (⋈) combines tables. Division (÷) answers "for all" questions.
  • Relational algebra says how to get a result. Tuple calculus says what the result must satisfy.
  • Entity integrity: a primary key is never NULL. Referential integrity: a foreign key matches a row in the other table or is NULL.
  • A B+ tree keeps row pointers only in its leaves, and the leaves are linked, which suits range queries. A B tree can hold row pointers in any node.
  • Heap files insert fast. Sorted files suit range scans. Hashed files suit equality lookups.
  • ACID: atomicity, consistency, isolation, durability.
  • To test a schedule, draw a precedence graph. A cycle means it is not conflict serializable. Two-phase locking (a growing phase, then a shrinking phase) ensures conflict serializability, but it can still deadlock.
  • Know the three read problems: dirty read, non-repeatable read and phantom read.

What to practise next

  • Draw an ER model for a small library system, then turn it into tables.
  • Take three relations with given dependencies. Find the keys and the highest normal form.
  • Draw precedence graphs for three schedules.

Normal forms compared

Normal forms compared
FormRuleFails when
1NFEvery value is atomicA cell holds a list of phone numbers
2NF1NF, and no non-prime attribute depends on part of a candidate keyKey is (StudentId, CourseId), but StudentName depends on StudentId alone
3NF2NF, and no non-prime attribute depends transitively on a keyEmpId → DeptId → DeptName
BCNFFor every non-trivial X → Y, X is a super keyTeacher → Course, where Teacher is not a super key

Sample question, written by us

R(A, B, C, D) has the dependencies AB → C and C → D. What is its highest normal form?

Answer: 2NF. AB is the only candidate key, because its closure is ABCD and neither A nor B appears on a right-hand side. Nothing depends on part of AB, so 2NF holds. C → D is transitive and D is not prime, so 3NF fails. Split it into R1(A, B, C) and R2(C, D).

Phase I: 10 marks

SQL queries

Phase I only. Write queries and run them. The common traps come from NULL and from the type of join.

Key ideas

  • Logical order: FROM, WHERE, GROUP BY, HAVING, SELECT, ORDER BY. So WHERE cannot use an aggregate, and HAVING can.
  • DELETE removes chosen rows and takes a WHERE. TRUNCATE empties the table and keeps its structure. DROP removes the table itself. ALTER changes the structure.
  • COUNT(*) counts rows. COUNT(col) skips NULLs. SUM, AVG, MIN and MAX skip NULLs too.
  • A comparison with NULL is unknown, not true. Use IS NULL, never = NULL.
  • INNER JOIN keeps matches. LEFT JOIN keeps every left row and fills the gaps with NULL. A WHERE filter on the right table can quietly turn a LEFT JOIN into an inner join.
  • UNION removes duplicates and UNION ALL keeps them. INTERSECT keeps common rows. EXCEPT keeps rows found only in the first result. Column counts must match.
  • IN compares a value with a list. EXISTS is true as soon as the subquery finds a row. A correlated subquery refers to the outer row.
  • A view is a stored query, not a stored copy of the data. A materialized view is the exception.

What to practise next

  • Write 20 queries on two small tables, covering each join type, GROUP BY with HAVING, and a nested query.
  • Add a NULL to your data and predict what changes before you run the query again.
  • Rewrite one IN query with EXISTS and one with a JOIN.

Worked example: why NOT IN can return nothing

SQL, run on SQLite

CREATE TABLE dept(id INT, name TEXT);
INSERT INTO dept VALUES (10, 'IT'), (30, 'HR');
CREATE TABLE emp(id INT, dept_id INT);
INSERT INTO emp VALUES (1, 10), (2, 20), (3, NULL);

SELECT COUNT(*), COUNT(dept_id) FROM emp;
SELECT d.name, e.id FROM dept d LEFT JOIN emp e ON e.dept_id = d.id ORDER BY d.id;
SELECT name FROM dept WHERE id NOT IN (SELECT dept_id FROM emp);
SELECT name FROM dept d WHERE NOT EXISTS (SELECT 1 FROM emp e WHERE e.dept_id = d.id);

What it printed

3 | 2
IT | 1
HR | NULL
(no rows)
HR

The NULL in dept_id makes 30 NOT IN (10, 20, NULL) unknown, so the third query returns no rows. NOT EXISTS has no such problem and finds HR.

Sample question, written by us

Table t has one column v, with the rows 1, 2 and NULL. What does this return?

SQL, run on SQLite

CREATE TABLE t(v INT);
INSERT INTO t VALUES (1), (2), (NULL);

SELECT COUNT(*), COUNT(v), SUM(v), AVG(v) FROM t;

Answer: 3 | 2 | 3 | 1.5. COUNT(*) counts all three rows. The others skip the NULL, so AVG is 3 divided by 2.

Phase I: 10 marks

Data analytics languages (Python and R)

Phase I only. Be able to read short Python or R and say how the data changes at each step.

Key ideas

  • A list is ordered and mutable. A tuple is ordered and immutable. A set holds unique values. A dictionary maps hashable keys to values.
  • s[start:stop:step] leaves out stop. A list slice is a new list, but a shallow copy.
  • R counts from 1, and x[2:4] includes both ends. x[-1] drops the first element in R, but means the last element in Python.
  • In pandas, loc uses labels and includes the stop. iloc uses positions and leaves out the stop.
  • Reshaping in pandas: melt goes from wide to long. pivot goes from long to wide and fails on duplicate pairs. pivot_table aggregates them. merge works like a SQL join.
  • Python's re.match looks only at the start of the string, re.search scans all of it, and re.findall returns every match.
  • with open(path) as f: closes the file for you. Mode w empties the file first and a appends. For tables, use read_csv and to_csv in pandas, or read.csv and write.csv in R.
  • Choose a chart by the question. Histogram: one variable's distribution. Bar: categories. Scatter: two numeric variables. Box plot: spread and outliers.
  • Data mining: classification learns from known labels, clustering has no labels, and association rules find items that occur together. Support of A → B is the share of transactions with both. Confidence is support of both divided by support of A.

What to practise next

  • Load a small CSV into a dataframe. Filter it, group it and write the result out again.
  • Write five regex patterns and test them on real text: a phone number, a date, an email address, a repeated word and a price.
  • If you choose R, redo the same steps with read.csv, subset and aggregate.

Worked example: slicing and regex in one run

Python 3

import re

nums = [10, 20, 30, 40, 50]
print(nums[1:4])
print(nums[-2:])
print(nums[::-1])

print(re.match(r"\d+", "abc123"))
print(re.search(r"\d+", "abc123").group())
print(re.findall(r"<.*>", "<a><b>"))
print(re.findall(r"<.*?>", "<a><b>"))

What it printed

[20, 30, 40]
[40, 50]
[50, 40, 30, 20, 10]
None
123
['<a><b>']
['<a>', '<b>']

match fails because the string starts with letters. .* is greedy and takes as much as it can. .*? is lazy and stops at the first >.

Sample question, written by us

What does this Python program print?

Python 3

def add(x, items=[]):
    items.append(x)
    return items

add(1)
print(add(2))

Answer: [1, 2]. A default value is created once, when the function is defined, so both calls share one list.

Phase I: 10 marks. Phase II: 30 marks

Algorithms

The only topic named in both IT tables. Phase I adds graphs, and Phase II adds backtracking and pattern searching.

Key ideas

  • BFS uses a queue and finds shortest paths in an unweighted graph. DFS uses a stack or recursion and suits cycle detection and topological sort. Both take O(V + E) with adjacency lists.
  • Connected components: start a BFS or DFS from each unvisited vertex. The number of starts is the number of components.
  • A minimum spanning tree has V - 1 edges. Kruskal sorts edges and uses union-find, O(E log E). Prim grows from one vertex with a min-heap, O(E log V).
  • Dijkstra finds single-source shortest paths when no edge is negative. Bellman-Ford allows negative edges and detects negative cycles, O(VE). Floyd-Warshall finds all pairs, O(V³).
  • Greedy takes the locally strongest choice and never goes back. It works for fractional knapsack and activity selection.
  • Dynamic programming stores answers to overlapping subproblems. It solves 0/1 knapsack and longest common subsequence.
  • Divide and conquer recurrences: T(n) = 2T(n/2) + n gives O(n log n). T(n) = T(n/2) + 1 gives O(log n).
  • Backtracking builds a partial answer and undoes the last choice when a rule breaks, as in N-Queens and subset sum.
  • Pattern searching: the naive method is O(nm). KMP is O(n + m) using a prefix table. Rabin-Karp uses a rolling hash, averaging O(n + m) with a worst case of O(nm).

What to practise next

  • Dry-run BFS, DFS, Dijkstra and Kruskal by hand on one small graph.
  • Code merge sort, quick sort and binary search from memory.
  • Solve 0/1 knapsack and longest common subsequence with a table on paper.
  • Build the KMP prefix table for three patterns.

Sorting algorithms compared

Sorting algorithms compared
SortBest caseAverageWorstStable
Bubble, with early exitO(n)O(n²)O(n²)Yes
SelectionO(n²)O(n²)O(n²)No
InsertionO(n)O(n²)O(n²)Yes
MergeO(n log n)O(n log n)O(n log n)Yes
QuickO(n log n)O(n log n)O(n²)No
HeapO(n log n)O(n log n)O(n log n)No

Worked example: where greedy fails on 0/1 knapsack

Python 3

items = [("A", 6, 30), ("B", 5, 20), ("C", 5, 20)]
capacity = 10

# Greedy: highest value per unit of weight first
left, greedy = capacity, 0
for name, w, v in sorted(items, key=lambda i: i[2] / i[1], reverse=True):
    if w <= left:
        left -= w
        greedy += v

# Dynamic programming: each item used at most once
dp = [0] * (capacity + 1)
for name, w, v in items:
    for c in range(capacity, w - 1, -1):
        dp[c] = max(dp[c], dp[c - w] + v)

print("greedy", greedy)
print("dp", dp[capacity])

What it printed

greedy 30
dp 40

Greedy takes A because it has the highest value per unit of weight, and then nothing else fits. The real answer is B and C together.

Sample question, written by us

T(n) = 2T(n/2) + n, with T(1) = 1. What is T(8), and how does T(n) grow?

Answer: T(8) = 32. T(2) = 4, T(4) = 12, T(8) = 2 × 12 + 8 = 32. It grows as O(n log n), the same recurrence as merge sort.

Phase I: 10 marks

Networking concepts

Phase I only. Build clean distinctions: which layer, which device, which protocol, which port.

Key ideas

  • OSI layers, bottom up: physical (bits), data link (frames), network (packets), transport (segments), session, presentation, application.
  • A hub works at layer 1 and repeats bits. A switch works at layer 2 and forwards frames by MAC address. A router works at layer 3 and forwards packets by IP address. A gateway connects networks that use different protocols.
  • Each switch port is its own collision domain, but the switch is one broadcast domain. A router separates broadcast domains. A VLAN splits one switch into several.
  • Ethernet uses CSMA/CD on shared half-duplex links. Token ring passes a token, so only the holder sends. Wi-Fi uses CSMA/CA.
  • TCP opens with SYN, SYN-ACK, ACK.
  • Ports to know: FTP 20 and 21, SSH 22, SMTP 25, DNS 53, HTTP 80, POP3 110, IMAP 143, HTTPS 443.
  • SMTP sends mail. POP3 and IMAP fetch it: POP3 usually downloads it to one device, and IMAP keeps it on the server.
  • IPv4 addresses are 32 bits and IPv6 addresses are 128 bits. A /26 network has 64 addresses and 62 usable hosts, with the mask 255.255.255.192.
  • A packet filter reads headers only. A stateful firewall also tracks connections. An application firewall or proxy reads the content.

What to practise next

  • Write the seven layers from memory, with one protocol and one device against each.
  • Work out network address, broadcast address and host count for five subnets.
  • Sketch what happens when a browser opens a page: DNS, the TCP handshake, then HTTP.

TCP and UDP compared

TCP and UDP compared
FeatureTCPUDP
ConnectionSet up firstNone
DeliveryAcknowledged, resent if lostNo acknowledgement
OrderKept in orderNot kept
Flow and congestion controlYesNo
Header20 bytes minimum8 bytes
Typical useHTTP, SMTP, FTPDNS queries, streaming, VoIP

Sample question, written by us

How many usable host addresses does a /27 network have?

Answer: 30. That leaves 5 host bits, so 2⁵ = 32 addresses. Take away the network and broadcast addresses and 30 remain.

Phase I: 10 marks

Information and cyber security

Phase I only. Link each attack to what it breaks and what stops it.

Key ideas

  • CIA triad. Confidentiality: encryption and access control. Integrity: hashes and digital signatures. Availability: backups, redundancy and DoS protection.
  • Symmetric encryption, such as AES, uses one shared key and is fast. Asymmetric encryption, such as RSA, uses a public and a private key and is slower. A hash, such as SHA-256, is one-way.
  • To keep a message secret, encrypt with the receiver's public key. To sign, use the sender's private key on a hash of the message. A signature gives integrity, authentication and non-repudiation.
  • Authentication asks who you are. Authorization asks what you may do. The three factors are something you know, have and are, so two passwords are not two-factor authentication.
  • Store passwords with a salted, slow hash such as bcrypt or Argon2. Never store them as plain text.
  • Secure development: validate input, use parameterized queries, encode output and grant least privilege. SAST reads the source without running it. DAST tests the running application.
  • An IDS detects and alerts. An IPS sits in line and blocks. A VPN carries traffic through an encrypted tunnel.
  • A network audit reviews devices, open ports, firewall rules and patch levels. A systems audit reviews access rights, logs, change control and backups. A vulnerability scan lists weaknesses, and a penetration test tries to exploit them.

What to practise next

  • Write the attack table above from memory, then add three more attacks.
  • Explain the path of a signed and encrypted message, naming every key used.
  • List ten things you would check in a network audit, and ten in a systems audit.

Common attacks, what they do and the main defence

Common attacks, what they do and the main defence
AttackWhat it doesMain defence
SQL injectionChanges a query through user inputParameterized queries
Cross-site scripting (XSS)Runs a script in the victim's browserOutput encoding, content security policy
CSRFSends a forged request on the victim's sessionCSRF tokens, SameSite cookies
PhishingTricks people into giving credentialsAwareness, multi-factor authentication
DoS and DDoSFloods a service, hitting availabilityRate limits, traffic filtering, redundancy
Man in the middleReads or changes traffic in transitTLS with certificate checks
RansomwareEncrypts data and demands paymentOffline backups, patching

Worked example: the same login check, unsafe and safe

Python 3 with SQLite

import sqlite3

db = sqlite3.connect(":memory:")
db.execute("CREATE TABLE users(name TEXT, pw TEXT)")
db.execute("INSERT INTO users VALUES ('asha', 's3cret')")

name, pw = "asha", "' OR '1'='1"

unsafe = f"SELECT COUNT(*) FROM users WHERE name='{name}' AND pw='{pw}'"
print(db.execute(unsafe).fetchone()[0])

safe = "SELECT COUNT(*) FROM users WHERE name=? AND pw=?"
print(db.execute(safe, (name, pw)).fetchone()[0])

What it printed

1
0

In the first query the input becomes part of the SQL, so the OR makes the check pass with a wrong password. In the second it stays a plain value, and no row matches.

Sample question, written by us

A sender signs a document digitally. Which key signs it, and which key checks the signature?

Answer: The sender's private key signs it and the sender's public key checks it. Anyone can check, but only the holder of the private key could have signed.

Phase I: 5 marks

Data warehousing

Phase I only, and a small topic. It is mostly definitions and comparisons, so one focused sitting can cover it.

Key ideas

  • ETL: extract from source systems, clean (missing values, duplicates, formats), transform (join, aggregate, standardise), then load. ELT loads first and transforms inside the warehouse.
  • A warehouse is subject-oriented, integrated, time-variant and non-volatile. A data mart covers one department or subject. A dependent mart is fed by the warehouse, and an independent mart is fed directly by sources.
  • Star schema: one fact table with denormalised dimension tables. Snowflake schema: the dimensions are normalised. Fact constellation: several fact tables share dimensions.
  • Facts hold measures, and dimensions hold the context. Additive measures, such as sales, can be summed across all dimensions. Semi-additive ones, such as an account balance, cannot be summed over time.
  • Metadata is data about data. Technical metadata covers tables and mappings, business metadata covers meanings, and operational metadata covers load history.
  • A cube with n dimensions and no hierarchies has 2ⁿ cuboids.

What to practise next

  • Draw a star schema for sales data, then normalise one dimension to make it a snowflake.
  • Say which cube operation fits each of five reporting questions.

OLTP and OLAP, and the cube operations

OLTP and OLAP, and the cube operations
ItemMeaning
OLTPMany short transactions on current data, normalised, for daily operations
OLAPLong read-heavy queries on historical data, often denormalised, for analysis
Roll-upSummarise upward, such as month to quarter
Drill-downGo into more detail, such as quarter to month
SliceFix one dimension, such as month = January
DicePick a sub-cube using conditions on two or more dimensions
PivotRotate the axes to view the same data another way

Sample question, written by us

A sales cube has the dimensions product, region and month, with no hierarchies. How many cuboids does it have?

Answer: 8, because 2³ = 8. They are one 3-D cuboid, three 2-D, three 1-D and one 0-D (the grand total).

Phase I: 5 marks

Shell programming

Phase I only, and a small topic. Small syntax rules cause most of the mistakes here.

Key ideas

  • No spaces around = when assigning: x=5. Double quotes expand variables: "$x". Single quotes do not: '$x'.
  • $0 is the script name, $1 the first argument, $# the argument count, $@ all arguments, $? the last exit status and $$ the process ID.
  • An exit status of 0 means success. return leaves a function with a status from 0 to 255, and exit ends the script. To send back text, echo it and capture it with $(...).
  • [ "$a" -eq "$b" ] compares numbers and [ "$a" = "$b" ] compares strings. Also learn -gt, -lt, -f (file exists), -d (directory exists) and -z (empty string).
  • Arithmetic: $((a + 1)). Loops: for x in a b c; do ...; done and while [ ... ]; do ...; done.
  • Commands to know: ls, cp, mv, rm, grep, sed, awk, cut, sort, uniq, wc -l, head, tail, find, chmod.
  • uniq removes only adjacent duplicates, so sort first. > overwrites, >> appends, 2> redirects errors and | pipes output onward.
  • chmod 754 means rwx for the owner, r-x for the group and r-- for others.

What to practise next

  • Write a script that takes a file name, checks that it exists, and prints its line count.
  • Build one pipeline with grep, sort, uniq -c and head on a log file.

Worked example: arguments, a function and a loop

sh

is_big() {
    if [ "$1" -gt 5 ]; then
        return 0
    fi
    return 1
}

count=0
for n in "$@"; do
    if is_big "$n"; then
        count=$((count + 1))
    fi
done
echo "args=$# big=$count"

Printed by sh demo.sh 3 7 9

args=3 big=2

return 0 means success, so if treats it as true. Inside the function $1 is the function's own argument, not the script's.

Sample question, written by us

A script is run as ./run.sh a "b c" d. What are $# and $2?

Answer: $# is 3 and $2 is b c. The quotes keep the middle argument as one word.

Phase II: 40 marks

Data structures

The largest topic in the Phase II IT paper. Know what each operation costs, and practise dry runs by hand.

Key ideas

  • A 2-D array in row-major order: address = base + (i × columns + j) × size. In column-major order: base + (j × rows + i) × size.
  • Stacks are last in, first out. They handle bracket matching, postfix evaluation, function calls and DFS.
  • Queues are first in, first out. They handle BFS and scheduling. A circular array queue is full when (rear + 1) % n == front.
  • To reverse a linked list you need three pointers: previous, current and next. To find the middle or a cycle, use a slow and a fast pointer.
  • An in-order walk of a binary search tree gives sorted output. A binary tree with n nodes has n - 1 edges. A preorder and an inorder list together fix one unique tree.
  • In a heap stored in a 0-based array, the children of i are at 2i + 1 and 2i + 2, and the parent is at (i - 1) / 2, rounded down. Building a heap from n items is O(n).
  • Hash collisions are handled by chaining or by open addressing. Linear probing causes clustering. Load factor is n divided by the table size.
  • A database index is usually a B+ tree: a slower write in exchange for a faster read.
  • Multiplying an m × n matrix by an n × p matrix gives m × p and takes mnp multiplications. A sparse matrix stores only its non-zero values.
  • JSON objects are key-value pairs in braces, and arrays go in brackets. Keys are double-quoted strings. Trailing commas and comments are not allowed.

What to practise next

  • Code a linked list, a stack, a queue and a BST from memory in one language.
  • Dry-run insert and delete on a BST and a heap, drawing each step.
  • Given a preorder and an inorder list, rebuild the tree on paper.
  • Read a nested JSON object and write the path to one inner value.

Typical cost of common operations

Typical cost of common operations
StructureSearchInsertDelete
Array, unsortedO(n)O(1) at the end, O(n) in the middleO(n)
Array, sortedO(log n)O(n)O(n)
Linked listO(n)O(1) at the headO(1) once you hold the previous node
Stack or queueO(n)O(1)O(1)
BST, balancedO(log n)O(log n)O(log n)
BST, skewedO(n)O(n)O(n)
Binary heapO(n), or O(1) for the topO(log n)O(log n) for the top
Hash tableO(1) average, O(n) worstO(1) average, O(n) worstO(1) average, O(n) worst

Worked example: a min-heap, step by step

Python 3

import heapq

heap = []
for value in [5, 3, 8, 1]:
    heapq.heappush(heap, value)
    print(value, heap)

print("pop", heapq.heappop(heap), heap)

What it printed

5 [5]
3 [3, 5]
8 [3, 5, 8]
1 [1, 3, 8, 5]
pop 1 [3, 5, 8]

An insert goes to the end, then swaps up while it is smaller than its parent, so 1 swaps with 5 and then with 3. A pop moves the last item to the root, then swaps it down.

Sample question, written by us

A C array int a[4][5] starts at address 1000, and an int takes 4 bytes. What is the address of a[3][4]?

Answer: 1076. C uses row-major order: 1000 + (3 × 5 + 4) × 4 = 1000 + 76.

Phase II: 20 marks

Object oriented programming

A Phase II topic that also overlaps Phase I programming, which lists OOP concepts, inheritance, classes and constructors.

Key ideas

  • Abstraction hides how something works and shows what it does. Encapsulation keeps data private behind methods. Inheritance reuses a parent class. Polymorphism lets one call behave by type.
  • Overloading: same name, different parameters, chosen at compile time. A different return type alone is not enough. Overriding: same signature in a subclass, chosen at run time.
  • C++ compile-time polymorphism means function overloading, operator overloading and templates. Run-time polymorphism needs a virtual function.
  • In C++, without virtual, the declared pointer type picks the function. In Java, instance methods are virtual by default.
  • Java fields and static methods are picked by the declared type. They are hidden, not overridden.
  • A Java abstract class can hold state and constructors, and a class extends only one. A class can implement many interfaces.
  • The diamond problem arises when two parents share a grandparent. C++ solves it with virtual inheritance. Java avoids it by allowing one parent class.
  • Java access levels, narrowest first: private, package (no keyword), protected, public.

What to practise next

  • Predict the output of five short programs that mix overriding, hiding and constructors, then run them.
  • Write one abstract class and one interface for the same idea, and note what each allows.
  • Read a C++ example with and without virtual, and explain the difference.

Worked example: what the declared type decides, and what the object decides

Java

class Base {
    String name = "base field";
    Base() { System.out.println("Base constructor"); }
    void show() { System.out.println("Base show"); }
    static void who() { System.out.println("Base static"); }
}

class Child extends Base {
    String name = "child field";
    Child() { System.out.println("Child constructor"); }
    @Override void show() { System.out.println("Child show"); }
    static void who() { System.out.println("Child static"); }
}

public class Main {
    public static void main(String[] args) {
        Base b = new Child();
        b.show();
        b.who();
        System.out.println(b.name);
    }
}

What it printed

Base constructor
Child constructor
Child show
Base static
base field

The object is a Child, so the overridden show runs. The variable's declared type is Base, so it picks the static method and the field.

Sample question, written by us

In C++, which of these is decided at run time: function overloading, operator overloading, a template, or a call to a virtual function?

Answer: A call to a virtual function. The other three are settled at compile time.

Phase II: 10 marks

String manipulation

A small Phase II topic, listed as length, substring, regex and search. Each language has its own traps.

Key ideas

  • Java and Python strings are immutable. Repeated += in a Java loop is O(n²), so use StringBuilder.
  • In Java, == compares references and .equals() compares contents. substring(begin, end) leaves out end.
  • In C, strlen stops at the \0 and does not count it. sizeof on a char array includes it. strcmp returns 0 when strings match.
  • In Python, find returns -1 when nothing matches, and index raises an error.
  • A string of length n has n(n + 1)/2 non-empty substrings by position, and 2ⁿ - 1 non-empty subsequences. A substring is contiguous, and a subsequence need not be.
  • Regex basics: ^ start, $ end, . any character, * zero or more, + one or more, ? zero or one, {m,n} a count range, [abc] a set, \d digit, \w word character.
  • A capture group (...) remembers what it matched, and \1 must match that same text again.
  • Search: the naive method is O(nm), and KMP is O(n + m). The KMP prefix table for ababaca is 0 0 1 2 3 0 1.
  • Palindrome check: two pointers moving inward. Anagram check: compare letter counts, O(n).

What to practise next

  • Write length, reverse and substring by hand in C, without library calls.
  • Write regex patterns with a capture group and a backreference, then test them.
  • Build the KMP prefix table for three patterns, then trace one search.

Worked example: length and comparison in C

C

#include <stdio.h>
#include <string.h>

int main(void) {
    char s[] = "SEBI";
    printf("%zu %zu\n", strlen(s), sizeof(s));
    printf("%d\n", strcmp("abc", "abc"));
    return 0;
}

What it printed

4 5
0

strlen counts 4 letters. sizeof counts the array, which also holds the terminating \0.

Worked example: references and contents in Java

Java

public class Main {
    public static void main(String[] args) {
        String a = "sebi";
        String b = "sebi";
        String c = new String("sebi");
        System.out.println((a == b) + " " + (a == c) + " " + a.equals(c));
        System.out.println("grade".substring(1, 3));
    }
}

What it printed

true false true
ra

The two literals share one object. new String makes another object with the same contents. substring(1, 3) takes positions 1 and 2.

Sample question, written by us

What does this Python program print?

Python 3

import re

print(re.findall(r"(\w)\1", "book keeper"))

Answer: ['o', 'e']. (\w) captures a letter and \1 needs the same letter again, which finds oo and ee. The two k's are not adjacent, because a space sits between them. With a group in the pattern, findall returns the group.

PDF library

SEBI folders in the TVK PDF library

Counts and labels as shown to a signed-out visitor on 4 November 2026. We read the folder listings only. Labels can change, so the library shows the current one. Pro files need paid access, such as the course.

SEBI folders in the TVK PDF library, with file counts and labels
FolderFiles named forFilesFreePro
SEBI Grade A IT 2026-27Cyber security starter, shell programming, plus the 60-Day IT Plan folder743
60-Day IT Plan (inside the folder above)Day 01 to Day 05, named for data structures and algorithms541
SEBI - Phase 01Cyber security, data analytics, databases, data warehousing, shell scripting, SQL, networks972
SEBI - Practice IT MCQsIT Practice 1 to 5514
SEBI - GAGA 1 to GA 4422
SEBI HandoutOne file, SEBI Handout110
SEBI Interview DocumentsCyber security cheat sheet, interview preparation guides 1 to 3404
All folders, each file counted once301515

We link to folders rather than single files, and the library decides what opens for you. To test what you have revised, go to the SEBI mock tests.

Questions

SEBI Grade A IT notes: frequently asked questions

Are these SEBI Grade A IT notes free?

Everything on this page is free to read, with no account. The PDF library is mixed: some files are free and some need the course. When we checked signed out on 4 November 2026, 15 of the 30 files across our SEBI folders were labelled Free and 15 were labelled Pro. Labels can change, so the library shows the current one.

Does this page replace the PDF library?

No. These are short revision summaries written for this page. They point you to the library, and they do not reproduce or summarise its files.

Which subject should I revise first?

Follow the marks in the 2025 advertisement. In the Phase II IT paper, data structures carry 40 and algorithms 30. In the Phase I IT paper, programming carries 30. SEBI calls these weights indicative only, and the next advertisement can change them.

Are operating systems in the SEBI Grade A IT syllabus?

Not in the 2025 advertisement's IT topic tables. Operating systems appear there only in the Engineering (Electrical) syllabus. The nearest IT topic is shell programming, at 5 marks in Phase I. Check the next advertisement when SEBI publishes it.

Which programming language should I use?

The 2025 Phase I topic names Java, C and C++, and Python or R is a separate 10-mark topic. Pick one language to write in, and learn to read the others. SEBI's 2025 Phase II handout gives two IT sample questions, one on C++ compile-time polymorphism and one on a regex backreference.