Information information


Marks distribution : Assignments: 50%;   Lab Tests 50%.
There will be no Mid-Sem or End-Sem examination for this course.

All classes will be held in CSSC Lab - I, 4th Floor, SN Bose Bhavan (Library Building).

Lectures lectures

Day Date Topic Note Ref
0 20 Jul 2017 Preliminaries, Introduction to UNIX-like systems [MM] Slides [PDF] (B3), (B16)
1 25 Jul 2017 Programming in C – revision (basics) [AB] Slides [PDF] (B1), (B14)
Problem solving in C [SSG]
(Ignore slide number 1)
Slides [PDF] (B2)
2 27 Jul 2017 Programming in C – revision (types, arrays, pointers) [AB,MM] Slides [PDF]
(B1), (B14)
3 01 Aug 2017 Programming in C – revision (structures) [AB,MM] Slides [PDF] (B1), (B14)
02 Aug 2017 Tutorial [SD] Problems [PDF] Solutions [PDF]
4 03 Aug 2017 Programming in C – revision (structures, contd.) [AB,MM] See above. (B1), (B14)
Programming in C – revision (functions, file handling) [AB,MM] Slides [PDF] (B1), (B14)
Problems for Day 4 Slides [PDF]
Solution sketch [PDF]
Test case for prob. 4
(B1), (B14)
5 08 Aug 2017 GDB, Valgrind [AB] GDB
gdb_1.c   gdb_2.c
1.c   2.c   3.c   4.c   5.c   6.c   7.c  
6 16 Aug 2017 Programming in C – wrapup [AB, SP]
Bitwise operators and type casting [SP]
Slides I [PDF]
Slides II [PDF]
7 17 Aug 2017 Programming in C – odds and ends [AB,MM] Slides [PDF]
Linked lists [MM] Slides [PDF]
Traditional implementation
Alternate implementation
(B6) Chapter 2
8 22 Aug 2017 Generics [AB] Slides [PDF]
A bit of assembly [AB] Slides [PDF]
9 24 Aug 2017 Professional Programming [AB] Slides [PDF]
A Sample codeBase [AB] Code
A stack for integers [AB] Code
A generic stack [Prof. Jerry] Slides [PDF]
10 12 Sep 2017 Recursion [MM] Slides [PDF]
11 13 Sep 2017 Recursion, binary trees [MM] See above.
Test cases
Program to generate test cases
12 14 Sep 2017 Sorting Techniques [SP] Slides [PDF]
Point Sort [PDF]
Code [C file]
13 19 Sep 2017 Heaps / priority queues [MM] Slides [PDF] (B14)
Section 2.4
14 10 Oct 2017 Search trees [MM] Slides [PDF]
15 12 Oct 2017 C++ sets and maps [MM] Slides [PDF]
16 17 Oct 2017 Recap
17 18 Oct 2017 C++ basics
[Kausik Datta]
Slides I [PDF]
Slides II [PDF]
Slides III [PDF]
18 24 Oct 2017 Balanced Search Trees [AB] Slides [PDF]
Courtesy: B14
Section 3.3
21 31 Oct 2017 Tries [MM] Slides [PDF] (B14)
Section 5.3
22 02 Nov 2017 Range Searching [SP] Slides [PDF]
23 06 Nov 2017 Recap + Makefiles [MM] Slides [PDF]
24 09 Nov 2017 Line segment intersection [AB] Program
Sample input

Assignments assignments

No. Deadline Test cases Solutions
Assignment 1 17th August, 2017 Test cases
Assignment 2 15th September, 2017
Assignment 3 10th October, 2017 Test cases Solutions (incomplete)
Assignment 4 08th December, 2017 Test cases

Lab Teststests

Test Date Question Solution
1 10 Aug 2017 Questions
2 16 Sep 2017 Questions Solutions
3 07 Nov 2017 Questions Test cases
4 02 Dec 2017 Questions Test cases



  • Solutions / solution sketches to some of the problems assigned on day 4 uploaded.
  • Slides for functions and file handling updated.


Teaching Assistants

Study Material

  1. The C Programming Language
    B. W. Kernighan and D. M. Ritchie
    Prentice Hall, India
  2. How to Solve it by Computer
    R. G. Dromey
    Pearson Education
  3. The Unix Programming Environment
    B. W. Kernighan and R. Pike
    Prentice Hall, India
  4. Introduction to Algorithms
    T. H. Cormen, C. E. Leiserson, R. L. Rivest and C. Stein
    MIT Press
  5. Fundamentals of Data Structures
    E. Horowitz and S. Sahni
    Universities Press
  6. Data Structures and Algorithms
    Alfred V. Aho, John E. Hopcroft and Jeffrey D. Ullman
  7. Data Structure Techniques
    T. A. Standish
    Addison Wesley
  8. The C++ Programming Language
    Bjarne Stroustrup
    Addison Wesley
  9. C++ - The Complete Reference
    Herbert Schildt
    McGraw Hill Education (India)
  10. Object-Oriented Programming in C++
    Robert Lafore
  11. Programming Languages Design and Implementation
    T. W. Pratt and M. V. Zelkowitz
  12. Fundamentals of Data Structures in C
    E. Horowitz, S. Sahni and S. Anderson-Freed
    Silicon Press
  13. Data Structures and Algorithm Analysis in C++
    Mark A. Weiss
  14. Algorithms
    Robert Sedgewick and Kevin Wayne
    Addison-Wesley Professional
  15. The Practice of Programming
    Brian Kernighan and Rob Pike
    Addison-Wesley Professional
  16. Programming Pearls
    Jon Bentley
  17. The Linux Command Line  
    William Shotts
    No Starch Press
  18. The GNU Make Manual  
    R. M. Stallman, R. McGrath and P. D. Smith
    Free Software Foundation
  19. Randomized Algorithms
    Rajeev Motwani and Prabhakar Raghavan
    Cambridge University Press