Computer Science


Computer Science and Programming


Data Structures and Algorithms


Arrays : Popular Sorting and Searching Algorithms

 

   

Bubble Sort Steps - Visualization

Bubble Sort   - One of the most elementary sorting algorithms to implement - and also very inefficient. Runs in quadratic time. A good starting point to understand sorting in general, before moving on to more advanced techniques and algorithms. A general idea of how the algorithm works and a the code for a C program.

Insertion Sort VIsualization


Insertion Sort - Another quadratic time sorting algorithm - an example of dynamic programming. An explanation and step through of how the algorithm works, as well as the source code for a C program which performs insertion sort. 

Selection Sort Visualization


Selection Sort Another quadratic time sorting algorithm - an example of a greedy algorithm. An explanation and step through of how the algorithm works, as well as the source code for a C program which performs selection sort. 











 Shell Sort An inefficient but interesting algorithm, the complexity of which is not exactly known.

 

 

 


Merge Sort  An example of a Divide and Conquer algorithm. Works in O(n log n) time. The memory complexity for this is a bit of a disadvantage.



Quick Sort In the average case, this works in O(n log n) time. No additional memory overhead - so this is better than merge sort in this regard. A partition element is selected, the array is restructured such that all elements greater or less than the partition are on opposite sides of the partition. These two parts of the array are then sorted recursively.

 













Heap Sort
Efficient sorting algorithm which runs in O(n log n) time. Uses the Heap data structure. 
 













Binary Search Algorithm
Commonly used algorithm used to find the position of an element in a sorted array. Runs in O(log n) time. 

Basic Data Structures  and Operations on them


   
Stacks

Stacks Last In First Out data structures ( LIFO ). Like a stack of cards from which you pick up the one on the top ( which is the last one to be placed on top of the stack ). Documentation of the various operations and the stages a stack passes through when elements are inserted or deleted. C program to help you get an idea of how a stack is implemented in code.

Queues

Queues  First in First Out data structure (FIFO). Like people waiting to buy tickets in a queue - the first one to stand in the queue, gets the ticket first and gets to leave the queue first. Documentation of the various operations and the stages a queue passes through as elements are inserted or deleted. C Program source code to help you get an idea of how a queue is implemented in code.

 
linked list
Single Linked List  A self referential data structure. A list of elements, with a head and a tail; each element points to another of its own kind.
Double Linked List

Double Linked List
A self referential data structure. A list of elements, with a head and a tail; each element points to another of its own kind in front of it, as well as another of its own kind, which happens to be behind it in the sequence. 

Circular Linked List Linked list with no head and tail - elements point to each other in a circular fashion.





 Tree Data Structures  

   

 

binary_search_tree

Binary Search Trees A basic form of tree data structures. Inserting and deleting elements in them. Different kind of binary tree traversal algorithms.

 Heaps  - A tree like data structure where every element is lesser (or greater) than the one above it. Heap formation, sorting using heaps in O(n log n) time.  Height Balanced Trees - Ensuring that trees remain balanced to optimize complexity of operations which are performed on them.  
 Graphs and Graph Algorithms 
   

 

Depth First Search - Traversing through a graph using Depth First Search in which unvisited neighbors of the current vertex are pushed into a stack and visited in that order.




 



Breadth First Search -

Traversing through a graph using Breadth First Search in which unvisited neighbors of the current vertex are pushed into a queue and then visited in that order.


Spanning Tree

Minimum Spanning Trees: Kruskal Algorithm
Finding the Minimum Spanning Tree using the Kruskal Algorithm which is a greedy technique. Introducing the concept of Union Find.
 
Spanning Tree

Minumum Spanning Trees: Prim's Algorithm
Finding the Minimum Spanning Tree using the Prim's Algorithm. 

 

Dijkstra

Dijkstra Algorithm for Shortest Paths
Popular algorithm for finding shortest paths : Dijkstra Algorithm.

 
Floyd Warshall Algorithm for Shortest Paths
All the all shortest path algorithm: Floyd Warshall Algorithm
 
Bellman Ford Algorithm 
Another common shortest path algorithm : Bellman Ford Algorithm.
 
Popular Algorithms in Dynamic Programming      
 Dynamic Programming A technique used to solve optimization problems, based on identifying and solving sub-parts of a problem first.

 Integer Knapsack problem
 An elementary problem, often used to introduce the concept of dynamic programming.
 Matrix Chain Multiplication
Given a long chain of matrices of various sizes, how do you parenthesize them for the purpose of multiplication - how do you chose which ones to start multiplying first?
 Longest Common Subsequence
 Given two strings, find the longest common sub sequence between them.
  Dynamic Programming Algorithms covered previously:
 Insertion Sort, Floyd Warshall Algorithm

Algorithms which we already covered, which are example of dynamic programming.
     
Greedy Algorithms  

     
 Elementary cases : Fractional Knapsack Problem, Task Scheduling - Elementary problems in Greedy algorithms - Fractional Knapsack, Task Scheduling. Along with C Program source code.

Data Compression using Huffman Trees
Compression using Huffman Trees. A greedy technique for encoding information.
 

Commonly Asked Programming Interview Questions - from Microsoft/Google/Facebook/Amazon interviews

A Collection of C Programs

  Miscellaneous C Programs
C Program to Reverse A String

C Program: Building an Expression Evaluator
C Program: Check for Armstrong Numbers
C Program: Check whether a string is a Palindrome or not
C Program: Common Operations on Sets - Union, Intersection, Difference, Cardinal Product
C Program: Computing exp(x), sin(x), cos(x), tan(x) using series expansions
C Program: Computing the Area of a Circle
C Program: Computing the Upper Triangular Matrix and Lower Triangular Matrix
C Program: Demonstrating File Handling Functions
C Program: Demonstrating Operations on Matrices - Addition, Subtraction, Multiplication, Inversion, Finding Determinants
C Program: Demonstrating the use of Bitwise Operators
C Program: Displaying a Histogram of word frequencies (unigram)
C Program: Distance Vector Routing Algorithm using Bellman Ford's Algorithm
C Program: Numerical Computing - The Gaussian Elimination Method
C Program: Numerical Computing - Implementing the Newton Raphson Method
C Program: Numerical Computing - the Bisection Method
C Program: Numerical Computing - The Gaussian Elimination Technique from Linear Algebra
C Program: Numerical Computing - the Jacobi Method
C Program: Printing the Pascal Triangle
C Program: Reversing the order of words in a sentence
C Program: Solving Simultaneous Equations in Two Variables
C Program: Source Code for computing the GCD(HFC) of two numbers
C Program: Source Code for Solving Quadratic Equations
C Program: Source code to solve the Josephus Problem
C Program: Sudoku Solver
C Program: The Usage of Command Line Arguments
C Program: Using the Sieve of Eratosthenes to print Prime Numbers

Functional Programming Principles and Techniques

 
Programming With Ruby
Introduction to Ruby and some playing around with the Interactive Ruby Shell (irb)
 
Programming With Ruby

Introduction to Ruby - Conditional statements and Modifiers: If-then, Unless, Case
 
Programming With Ruby
Introduction to Ruby Comments - Single and Multi-Line comments
 
Programming With Ruby
Introduction to Ruby Loops - Using While, Until, For, Break, Next , Redo, Retry
Programming With Ruby

Introduction to Ruby - Arrays - Sorting, Filtering (Select), Transforming, Multi-Dimensional Arrays
Programming With Ruby
Introduction to Ruby - Strings
Programming With Ruby
Introduction to Ruby - Making a Script Executable
Programming With Ruby
Introduction to Ruby - Regular Expressions, Match, Scan
 
Programming With Ruby
Introduction to Ruby - Computing Factorials Recursively : An Example of Recursion
Programming With Ruby
Introduction to Ruby - Binomial Coefficients (nCr) : An Example of Recursion
Programming With Ruby
Introduction to Ruby - Computing a Power Set : An Example of Recursion
Programming With Ruby
Introduction to Ruby - Towers of Hanoi : An Example of Recursion
 
Programming With Ruby
Introduction to Ruby - Strings: Substitution, Encoding, Built-In Methods
 



Basic Data Structures With Ruby



Databases - A Quick Introduction To SQL - Sample Queries demonstrating common commands

Introduction to SQL- A few sample queries - A Case Study - Coming up with a Schema for Tables -Taking a look at how the schema for a database table is defined, how different fields require to be defined. Starting with a simple "case study" on which the following SQL tutorials will be based. 

Introduction to SQL- A few sample queries : Creating Tables (CREATE) 

 Creating tables, defining the type and size of the fields that go into it.

 Introduction to SQL - A few sample queries : Making Select Queries 
 Elementary database queries - using the select statement, adding conditions and clauses to it to retrieve information stored in a database.
 Introduction to SQL - A few sample queries : Insert, Delete, Update, Drop, Truncate, Alter Operation Example of SQL commands which are commonly used to modify database tables. 

Introduction to SQL - A few sample queries: Important operators - Like, Distinct, Inequality, Union, Null, Join, Top
 Other Important SQL operators.

Introduction to SQL- A few sample queries: Aggregate Functions - Sum, Max, Min, Avg - Aggregate functions to extract numerical features about the data.

 


Introduction To Networking 

 Client Server Program in Python 

 A basic introduction to networking and client server programming in Python. In this, you will see the code for an expression calculator . Clients can sent expressions to a server, the server will evaluate those expressions and send the output back to the client. 

Introduction to Basic Digital Image Processing Filters

Introductory Digital Image Processing filters   Low-pass/Blurring filters, hi-pass filters and their behavior, edge detection filters in Matlab . You can take a look at how different filters transform images.
 Matlab scripts for these filters.

An Introduction to Graphics and Solid Modelling



Java Applet Visualizations of Common Algorithms and Data Structures 


Visualizations for common topics in CS. Visual-ware for an introductory CS course. 


  Sorting and searching arrays.

  Linear data structures : ListsStacks, Queues

  Trees : Binary search trees, Heaps, Height balanced trees

  Recursion

  Dynamic Programming

  Greedy Algorithms


 
 
 


 
    


A Collection of C Programs

\



Functional Programming Principles and Techniques



Databases - A Quick Introduction To SQL - Sample Queries demonstrating common commands

Introduction to SQL- A few sample queries - A Case Study - Coming up with a Schema for Tables -Taking a look at how the schema for a database table is defined, how different fields require to be defined. Starting with a simple "case study" on which the following SQL tutorials will be based. 

Introduction to SQL- A few sample queries : Creating Tables (CREATE) 

 Creating tables, defining the type and size of the fields that go into it.

 Introduction to SQL - A few sample queries : Making Select Queries 
 Elementary database queries - using the select statement, adding conditions and clauses to it to retrieve information stored in a database.
 Introduction to SQL - A few sample queries : Insert, Delete, Update, Drop, Truncate, Alter Operation Example of SQL commands which are commonly used to modify database tables. 

Introduction to SQL - A few sample queries: Important operators - Like, Distinct, Inequality, Union, Null, Join, Top
 Other Important SQL operators.

Introduction to SQL- A few sample queries: Aggregate Functions - Sum, Max, Min, Avg - Aggregate functions to extract numerical features about the data.

 





Areas of Mathematics which are important for Computer Science students


Basic of Linear Algebra


 Introduction to Matrices - Part I   Introduction to Matrices. Theory, definitions. What a Matrix is, order of a matrix, equality of matrices, different kind of matrices: row matrix, column matrix, square matrix, diagonal, identity and triangular matrices. Definitions of Trace, Minor, Cofactors, Adjoint, Inverse, Transpose of a matrix. Addition, subtraction, scalar multiplication, multiplication of matrices. Defining special types of matrices like Symmetric, Skew Symmetric, Idempotent, Involuntary, Nil-potent, Singular, Non-Singular, Unitary matrices.


Introduction to Matrices - Part II Problems and solved examples based on the sub-topics mentioned above. Some of the problems in this part demonstrate finding the rank, inverse or characteristic equations of matrices. Representing real life problems in matrix form.



Determinants Introduction to determinants. Second and third order determinants, minors and co-factors. Properties of determinants and how it remains altered or unaltered based on simple transformations is matrices. Expanding the determinant. Solved problems related to determinants.  Simultaneous linear equations in multiple variablesRepresenting a system of linear equations in multiple variables in matrix form. Using determinants to solve these systems of equations. Meaning of consistent, homogeneous and non-homogeneous systems of equations. Theorems relating to consistency of systems of equations. Application of Cramer rule. Solved problems demonstrating how to solve linear equations using matrix and determinant related methods. 



Applied Mathematics : An Introduction to Game Theory

Applied Mathematics : An Introduction to Operations Research

 Introduction to Operations Research

 A quick introduction to Operations Research. Introducing Linear Programming, standard and canonical forms. Linear Programming geometry, feasible regions, feasible solutions, simplex method. Some basic problems. 



 








































This page might be useful to those who are interested in learning Computer Science and programming online; and those who'd like to:
Learn Computer Science and  Computer Science and C/Java/Python Programming in Chennai; Learn Computer Science and  C/Java/Python Programming in Chandigarh; Learn Computer Science and  C/Java/Python Programming in Mumbai; Learn Computer Science and  C/Java/Python Programming in Hyderabad; Learn Computer Science and  C/Java/Python Programming in Shimla; Learn Computer Science and  C/Java/Python Programming in Pune; Learn Computer Science and  C/Java/Python Programming in Benagaluru; Learn Computer Science and  C/Java/Python Programming in Gandhinagar; Learn Computer Science and  C/Java/Python Programming in Thane; Learn Computer Science and  C/Java/Python Programming in Kolkata; Learn Computer Science and  C/Java/Python Programming in Gurgaon; Learn Computer Science and  C/Java/Python Programming in Ahmadabad; Learn Computer Science and  C/Java/Python Programming in Kalyan; Learn Computer Science and  C/Java/Python Programming in Dombivali; Learn Computer Science and  C/Java/Python Programming in Delhi; Learn Computer Science and  C/Java/Python Programming in Thiruvananthapuram; Learn Computer Science and  C/Java/Python Programming in Pimpri; Learn Computer Science and  C/Java/Python Programming in Chinchwad; Learn Computer Science and  C/Java/Python Programming in Jaipur; Learn Computer Science and  C/Java/Python Programming in Navi; Learn Computer Science and  C/Java/Python Programming in Mumbai; Learn Computer Science and  C/Java/Python Programming in Noida; Learn Computer Science and  C/Java/Python Programming in Bhubaneswar; Learn Computer Science and  C/Java/Python Programming in Bhopal; Learn Computer Science and  C/Java/Python Programming in Dehradun; Learn Computer Science and  C/Java/Python Programming in Lucknow; Learn Computer Science and  C/Java/Python Programming in Faridabad; Learn Computer Science and  C/Java/Python Programming in Guwahati; Learn Computer Science and  C/Java/Python Programming in Howrah; Learn Computer Science and  C/Java/Python Programming in Raipur; Learn Computer Science and  C/Java/Python Programming in Ranchi; Learn Computer Science and  C/Java/Python Programming in Ghaziabad; Learn Computer Science and  C/Java/Python Programming in Patna; Learn Computer Science and  C/Java/Python Programming in Rank; Learn Computer Science and  C/Java/Python Programming in City; Learn Computer Science and  C/Java/Python Programming in Index; Learn Computer Science and  C/Java/Python Programming in Vadodara; Learn Computer Science and  C/Java/Python Programming in Rajkot; Learn Computer Science and  C/Java/Python Programming in Nagpur; Learn Computer Science and  C/Java/Python Programming in Nashik; Learn Computer Science and  C/Java/Python Programming in Madurai; Learn Computer Science and  C/Java/Python Programming in Mysore; Learn Computer Science and  C/Java/Python Programming in Ludhiana; Learn Computer Science and  C/Java/Python Programming in Coimbatore; Learn Computer Science and  C/Java/Python Programming in Amritsar; Learn Computer Science and  C/Java/Python Programming in Indore; Learn Computer Science and  C/Java/Python Programming in Aurangabad; Learn Computer Science and  C/Java/Python Programming in Solapur; Learn Computer Science and  C/Java/Python Programming in Surat; Learn Computer Science and  C/Java/Python Programming in Jodhpur; Learn Computer Science and  C/Java/Python Programming in Gwalior; Learn Computer Science and  C/Java/Python Programming in Jabalpur; Learn Computer Science and  C/Java/Python Programming in Meerut; Learn Computer Science and  C/Java/Python Programming in Varanasi; Learn Computer Science and  C/Java/Python Programming in Kanpur; Learn Computer Science and  C/Java/Python Programming in Agra
Subpages (114): View All
Comments

Try out our Quizzes!