munotes®

Computer Science Practical 2 Notes | B.Sc. (Computer Science) Semester 2 | Mumbai University | munotes

Official Notes munotes.in

Computer Science Practical 2

B.SC. (COMPUTER SCIENCE) · SEMESTER 2

Strictly as per the University of Mumbai NEP syllabus in force for B.Sc. (Computer Science)

For B.Sc. (Computer Science) students of the University of Mumbai and all its affiliated colleges

Open the book ↓

munotes.in First Year

Contents

Module I Design and Analysis of Algorithms practicals: arrays, stacks, searching, sorting, pattern matching, recursion, greedy, divide and conquer, and dynamic programming

  1. How This Practical Is Examined: Twenty Exercises, the Journal and the Viva 1
  2. The Python Laboratory from Zero: Running a Program, Saving Its Output and Counting Its Steps 8
  3. Practical 1: Programs for One-Dimensional Arrays 16
  4. Practical 1 continued: Programs for Two-Dimensional Arrays 28
  5. Practical 2: A List-Based Stack and Its Operations 40
  6. Practical 3: Linear Search and Binary Search on a List 49
  7. Practical 4: Bubble Sort and Selection Sort 61
  8. Practical 4 continued: Insertion Sort, and the Three Sorts Compared 71
  9. Practical 5: the Nth Maximum and Nth Minimum Element of a List 79
  10. Practical 6: Finding a Pattern in a String by Brute Force 88
  11. Practical 6 continued: Faster Pattern Matching with Rabin-Karp and Knuth-Morris-Pratt 95
  12. Practical 7: Recursive Factorial, Fibonacci and the Tower of Hanoi 105
  13. Practical 8: the File Merging Problem by the Greedy Method 113
  14. Practical 8 continued: Coin Change by the Greedy Method 120
  15. Practical 9: Merge Sort by Divide and Conquer 127
  16. Practical 9 continued: Strassen's Matrix Multiplication 134
  17. Practical 10: the Fibonacci Series by Dynamic Programming 142
  18. Practical 10 continued: the Longest Common Subsequence 148

Module II OOPs using C++ practicals: classes, scope resolution, constructors and destructors, access specifiers, inheritance, overloading and overriding, pointers and files

  1. C++ from Zero: Installing g++, Compiling and Running Your First Program 156
  2. Practical 11: a Simple Class, Its Objects, Data Members and Member Functions 165
  3. Practical 12: Branching and Looping inside Class Methods 173
  4. Practical 13: One and Two-Dimensional Arrays in a Class 182
  5. Practical 14: the Scope Resolution Operator and Variables at Different Scopes 193
  6. Practical 15: Default, Parameterized and Copy Constructors, and Destructors 200
  7. Practical 16: Public, Protected and Private Access Specifiers 208
  8. Practical 17: Single and Multilevel Inheritance 215
  9. Practical 17 continued: Multiple and Hierarchical Inheritance 222
  10. Practical 17 continued: Constructors in Derived Classes and the Order They Run In 228
  11. Practical 18: Friend Functions, Inline Functions and the this Pointer 234
  12. Practical 19: Function Overloading and Function Overriding 241
  13. Operator Overloading for a Class of Your Own 248
  14. Practical 20: Pointers in a Class, and Dynamic Memory with new and delete 258
  15. Practical 20 continued: Text and Binary File Handling in a Class 268
  16. Sitting the Practical Examination: Q. 1, Q. 2 and the Viva 278
munotes.in

The chapters

Every chapter of this book comes with the B.Sc. (Computer Science) Semester 2 notes.

The cover and the contents are free to look through. Buy the notes once to read every chapter of every subject in this semester.

Notes + practical solutions + solved papers: ₹798 Already bought it? Sign in

Or notes + practical solutions: ₹499
Or solved papers only: ₹499

Free either way: question papers, the syllabus, and the cover and contents of every book.

The rest of this subject

These notes are cut from the University's printed syllabus. Open the syllabus itself for the same subject.

Issue
Done!