Data Structures-I Notes
Subject Overview
Data Structures-I is BCA's foundational data-structures paper, covering algorithm complexity and asymptotic notation, arrays (including multi-dimensional and sparse matrices), linked lists (singly, doubly, circular), stacks (with arithmetic expression conversion/
Subject at a glance
4
Units
36
Topics
3
Credits
4
Infographics
Unit-wise Syllabus
4 units — open any unit for detailed topic-wise notes, diagrams and important exam questions
- Definition
- classification and operations of data structures
- algorithm complexity
- asymptotic notations
- time-space trade-off
- linear array representation and operations (traversing, inserting, deleting)
- two-dimensional arrays
- sparse matrices
- multi-dimensional arrays
- O(1)
Constant: array access by index
- O(log n)
Logarithmic: binary search
- O(n)
Linear: traversing an array
- O(n log n)
Merge sort, heap sort
- O(n²)
Bubble, selection, insertion sort
Study guide
A data structure is a way of organising data so that operations on it are efficient. This unit introduces what data structures are, how they are classified, and how to judge an algorithm using complexity, asymptotic notations (big-O, omega, theta) and the time-space trade-off. It then covers arrays in depth: traversing, inserting and deleting in a linear array, two-dimensional and multi-dimensional arrays, and sparse matrices. Learn to count the number of steps an algorithm takes; that is what complexity measures.
- Definition
- comparison with arrays
- representation
- singly/doubly/circular linked lists — traversing
- inserting
- deleting
- searching
- applications of linked lists
Memory
Contiguous block
Nodes anywhere, linked by pointers
Size
Fixed when declared
Grows and shrinks dynamically
Access by position
O(1)
O(n)
Insert or delete in middle
O(n), elements shift
O(1) once the node is found
Study guide
Linked lists store items as nodes connected by pointers, so insertion and deletion do not require shifting elements as arrays do. You compare lists with arrays and study singly, doubly and circular linked lists, with traversing, inserting, deleting and searching, plus applications. Draw the nodes and arrows for every operation and check each pointer change carefully.
- Definition
- array and linked-list representation
- stack operations
- applications — arithmetic expressions
- Polish notation
- infix-to-postfix conversion
- postfix evaluation
- recursion definition
- recursive notation
- runtime stack
- applications (factorial, GCD, Fibonacci, Towers of Hanoi)
- 1Read A
Operand goes straight to output: A
- 2Read +
Push + on the stack
- 3Read B
Output: A B
- 4Read *
Higher precedence than +, push *
- 5Read C, then pop all
Output: A B C * +
Study guide
A stack follows last-in, first-out. You study stack representation using arrays and linked lists, the push and pop operations, and applications such as evaluating arithmetic expressions, Polish notation, infix-to-postfix conversion and postfix evaluation. The unit also introduces recursion: the runtime stack and classic examples such as factorial, GCD, Fibonacci and the Towers of Hanoi. Trace each conversion step by step in a table.
- Definition
- array and linked-list representation
- simple queue
- circular queue
- double-ended queue
- priority queue
- operations on simple and circular queues
- applications of queues
Structure
Linear array, front and rear move forward
Rear wraps to the start
Wasted space
Freed slots at the front cannot be reused
All slots are reused
Full condition
rear = size − 1
(rear + 1) % size = front
Use
Simple buffering
CPU scheduling, streaming buffers
Study guide
A queue follows first-in, first-out. You study queue representation using arrays and linked lists, the simple queue, circular queue, double-ended queue and priority queue, the main operations on simple and circular queues and where queues are used, such as scheduling and buffering. Understand why a circular queue solves the wasted-space problem of a simple array queue.
Why Data Structures-I Matters
Data Structures is the single most important paper for coding interviews and placement tests. Companies test arrays, linked lists, stacks and queues constantly because they reveal how well you think about efficiency. Mastering them also makes every later paper, from Operating Systems to Databases, easier to follow.
How to Prepare for Data Structures-I
- Draw every operation on paper before coding it; most bugs are pointer mistakes.
- Implement each structure yourself in C or C++ at least once.
- Practise infix-to-postfix conversion and postfix evaluation until you can do them without hesitation.
- Solve small interview-style problems on arrays and linked lists every week.
Data Structures-I: Frequently Asked Questions
Why is Data Structures important for placements?
Most technical interviews test arrays, linked lists, stacks, queues and the ability to analyse efficiency, so a solid base here is a direct advantage.
What is the difference between an array and a linked list?
An array stores elements in contiguous memory with fast indexed access but slow insertion and deletion, while a linked list stores nodes connected by pointers, allowing easy insertion and deletion but slower access by position.
What is the difference between a stack and a queue?
A stack is last-in, first-out and a queue is first-in, first-out.
