What You Need to Know Before Taking NPTEL DSA in Python (I completed it without certificate)

What You Need to Know Before Taking NPTEL DSA in Python (I completed it without certificate)

I have recently completed this NPTEL course (without certificate). And I discuss my personal experience and some tips to do this course.

ยท

6 min read

Introduction

Recently I completed the NPTEL course which is based on Data Structures and Algorithms in Python. This course is taught by Prof. Madhavan Mukund of Chennai Mathematical Institute. I like to thank the whole team of this course for making such a great course on such an unfamous topic and providing such great quality at free of cost.

Who should do this course and Why?

It's a great course for beginners in programming because it teaches Python from basic to intermediate level. If you don't have any prior knowledge of programming or Python you can take this course (no prerequisites). Also, this course teaches search and sorting algorithms at a very deep level. It also has many data structures like linked list, binary tree, heap, stack and queue. But I would say the Algorithms part was better. The Data Structure part was taught at a very basic level. I would recommend studying more about it from other resources.

Good luck if you are starting this course.

Why Python can be a great programming language for learning Data Structure and Algorithms

Python has a very beginner-friendly and easy-to-remember syntax. Python also has many inbuilt functions which can be very useful because you don't have to write the basic function in your code again and again (like you have to do in C) or import any library most of the time. But Python hides data types of variables because it's a dynamically typed language.

Python is a very popular language for Machine learning, Scientific calculations, and Data Science. Python is an interpreted language, no need to compile the code. Python is very easy to set up.

So, choose according to your aspirations and needs.

In the last lecture, Sir said a great line, "Learn Programming, NOT programming Language ". It's so true if you think deeply, the fundamentals of programming language are mostly the same and every language has pros and cons. Be a problem solver, not a syntax writer. Language doesn't matter, intent of learning and ability to solve problems matter. Programming language is just a medium. I understood this fact after some time.

Let's discuss each week one by one

Week 1 : Informal introduction to programming, algorithms and data structures Downloading and installing Python, gcd in Python: variables, operations, control flow - assignments, condition, loops, functions. It was very basic lectures, if you are a beginner you may find it very difficult but wait things will become easy after some weeks, be patient.

Week 2 : Python: types, expressions, strings, lists, tuples Python memory model: names, mutable and immutable values, List operations: slices etc, Binary search
Inductive function definitions: numerical and structural induction, Elementary inductive sorting: selection and insertion sort, In-place sorting. This week real stuff comes and you will know many things you don't know in Python. Give time if you are a beginner try writing basic programs in Python. Move slowly, but learn properly.

Week 3 : Basic algorithmic analysis: input size, asymptotic complexity, O() notation, Arrays vs lists, Merge sort, Quicksort, Stable sorting. Here we study some common sorting algorithms. Here, the code is discussed, understand it properly by dry running it using pen and paper.

Week 4 : Dictionaries, More on Python functions: optional arguments, default values, Passing functions as arguments, Higher order functions on lists: map, filter, list comprehension. This week was more about Python language, Merge Sort and Quicksort, it gives you taste of hashmap using dictionary data type. Dry run sorting algorithms and write some basic programs in Python using what you have learned.

Week 5 : Exception handling, Basic input/output, Handling files, String processing. This week was focused on Python, but this week's lectures had many Python concepts are discussed that are not known by many people who know Python. So, don't skip even if you know Python.

Week 6 : Backtracking: N Queens, recording all solutions, Scope in Python: local, global, nonlocal names, Nested functions, Data structures: stack, queue and
Heaps. This was focused on Data Structures and their implementation using list data type. This week also has a very important algorithm called Backtracking and it is explained, so view the lecture properly and at 1x speed.

Week 7 : Abstract datatypes Classes and objects in Python, Linked Lists : find, insert, delete, Binary search trees: find, insert, delete, Height-balanced binary search trees. This week's lectures were focused on OOP and Data Structure Implement. Data Structures were taught at a very introductory level so study from other resources also.

Week 8 : Efficient evaluation of recursive definitions: Memoization, Dynamic programming: examples, Other programming languages: C and manual memory management, Other programming paradigms: functional programming. This is the last week of this course. It was a fairly long week because it is on a very important topic of competitive programming called Dynamic Programming. Also, I found it was the assignment hardest of all. The last lecture was based on comparison of Python with other languages, some limitations of Python as a programming language and general advice for students.

Mistakes to avoid while taking this course

  • Don't view lectures at 2x speed. It's not a movie, it's a lecture. Pause when required, go back if you don't understand anything, search on the internet and go slow but learn properly.

  • Programming Assignments are relatively harder than Quizzes but teach you a lot and fill gaps in your learning. Please try to complete it on your own.

  • Check answers after completing the whole quiz. See your score and again study the weak topics.

  • Don't try to learn from multiple sources at once, first complete this course content then view other resources if needed.

  • Don't do multiple courses at once. If you try to learn from multiple resources, you will learn nothing. Move one-by-one.

Some Advices and Additional Things

It's not an 8-week course if you already know some Python.

Mostly, assignments are easy if you understood the lecture properly. My average score was 80%+. And please complete the assignment before going forward in the course, it's very beneficial for filling gaps in your understanding.

And don't leave this course incomplete. Take help and continue progressing.

In this course, Sir also runs the code on terminal/interpreter of Python to teach.

After completing this course you can make a project to showcase what you have learned in this course.

If you don't understand any topic properly in this course or some more stuff about Python not covered in this course, see this: https://www.cmi.ac.in/~madhavan/courses/python2022/

What after this course

This course makes a strong base for you in computer science and DSA. Now you can learn on your own.

Another course on Data Structures and Algorithms In Python by freeCodeCamp: https://www.freecodecamp.org/news/learn-algorithms-and-data-structures-in-python/

Also, Prof. Madhavan Mukund has an awesome course on the Design and Analysis of Algorithms: https://nptel.ac.in/courses/106106131

And many more, try searching on the internet.

Some Personal Talk

This was my first course of NPTEL and I would definitely recommend using NPTEL more because of its large library of free and quality courses. Also, I don't take certificate because it is a beginner-level course and the certificate was not free.

Also, I took this course after completing Harvard's CS50 (I have written blog about this, here) and I thought this NPTEL course will not have that type of high-production quality. But this course is very well taught and it took time for me to adjust to this type of teaching process. Also, some people find NPTEL courses very boring but that's not true, you have to concentrate to understand the topic perfectly.

I have made handwritten notes of this course, which took some additional time. And due to my college academic pressure, this course took more time than in general.

I learned how to use Python Official Documentation.

Also, I found last week's assignment the hardest because it was on Dynamic Programming and it's a hard topic.

Lastly, Thanks for Reading this Blog Post ๐Ÿ™Œ, hope you have a good day :)

Did you find this article valuable?

Support Shreyansh Agarwal by becoming a sponsor. Any amount is appreciated!

ย