Dept. of Computer Science

CSCI 301: Introduction to Algorithms and Data Structures
Instructor: Pranava K. Jha

 

Premature optimization is the root of most ills in programming today.  Tony Hoare


Fall 2008


Notes

1.      Abstract data types and related terms

2.      Compilation and execution


Programming Examples


  1. Introduction to a singly-linked list

Implementation

Alternative implementation

  2. Some examples of recursive functions

  3. An example of a dynamic array

  4. Examples of a function template

  5. Time of a day (class clockType)

Header file

Implementation file

Test file

  6. Date of a year (class dateType)

 Header file

 Implementation file

Test file

  7. Introduction to a circular (sorted) linked list 

Header file

Implementation file

Test file

  8. Implementing a stack using pointers (adapted from Carrano, Fifth edition, Chapter 6)

Header file

Implementation file

Test file

  9. Some applications of a stack

10. Determining whether or not a string of characters is a palindrome (using a stack and a queue)

11. Mergesort

12. Quicksort

13. Binary Tree

Header file

Implementation file

Test file

14. Binary Search Tree

Header file

Implementation file

Test file

15. Heapsort    
 

Program

 
16. Implementing a directed graph using an adjacency matrix

Header file

Implementation file

Test file

17. Graph traversals
18. Topological sorting on a directed acyclic graph
19. Performing shortest-paths algorithms on weighted directed graphs