NUS HomeCompetitive Programming
Home | Intro | Data Struct | Algo | Maths | Sort | Search | Greedy | DP | Graph | Comp. Geo | Data Struct+ | Misc


Update
Note:
I will revise the whole content of this notes from Chapter 1 until Chapter 12 using my own wordings... I will remove or rewrite texts that I have copied from other places (e.g. USACO texts) to avoid copyright issue. I will also give illustrations and notes to help the readers in understanding the concepts. This updating project was started on 8 May 2007, currently suspended..., and will only be resumed after I submitted my PhD thesis (late 2008).

Preface

These web pages contain a collection of one branch of Computer Science curricula: the (basic) data structures and algorithms. It is true that there are many other websites out there explaining the same topic. That is why, I designed these web pages to be different from them. Rather than repeating topics that are explained in other websites (which I can simply cite), I focused the writing on motivations and applications of using certain data structure or algorithm. Thus, you will see a lot of hands-on examples rather than going through mundane theories.

I hope that you will gain something new by reading through all the material in this website.

Very Important Note:
If you want to copy anything from this website and distribute it either for profit or non profit, you need to ask my permission first and must cite this website. Thanks for your understanding :)

In case you do not know, parts of the (older) content of this website are already published in Ahmed Shamsul Arefin's book: Art of Programming Contest. Please take a look. If you need to have a printed version of the (older version) of this website, buy/obtain/print this book.

Target Audience (Intermediate Programmers)

The reader should have some background knowledge in basic data structures, algorithms, and programming languages. Typically, a 2nd year Computer Science students should have the necessary background. I will be using explanations using two main programming languages, C++ (the STL), and C#. The contents in this website are not targeted for expert programmers. To gain access to newer and more sophisticated data structures or algorithms, browse the Internet for other sources.

Acknowledgements

I thanks God, for giving me some talent in algorithmic and programming skill, without that, all the stuffs that I have written here will not even exist. I also want to thanks my parents, who forced me to learn something with my new PC (at that time it was new) long long time ago, eventually I picked programming book, and since then I am interested to learn algorithm and programming. I have a lot of friends who introduced me to programming contest environment, and since then, I have participated in several contests and gained so much knowledge and experience. And to a lot others whom I cannot name one by one, thanks :).

Steven Halim (PhD candidate)
Instructor
Department of Computer Science
National University of Singapore
05 Jan 2009


Competitive Programming

Table of Contents

1. Introduction: what is algorithm?, what is data structure?, basic skills, where to practice?
2. Basic Data Structures: Array, Linked List, Stack, Queue.
3. Basic Algorithms: Brute Force, Recursion/Backtracking, Divide/Transform and Conquer,
4. Specialized Algorithm 1: Mathematical Algorithms

5. Specialized Algorithm 2: Sorting Algorithms
6. Specialized Algorithm 3: Searching Algorithms
7. Specialized Algorithm 4: Greedy Algorithms
8. Specialized Algorithm 5: Dynamic Programming Algorithms
9. Graph Data Structure and its Algorithms: DFS/BFS, MST, Single/All-Pairs Shortest Paths, Network Flows
10. Specialized Algorithm 6: Computational Geometry Algorithms
11. Advanced Data Structures: Heap, BST, Dictionary, Set, Data Structure Augmentation, Mix and Match
12. Links to Stochastic Local Search: NP-hardness, exact/complete algorithm, inexact/local searches


References

Most of these books should be available in your University libraries.
If not, you can buy it online, e.g. through amazon.com.
 

1

Introduction to Algorithms, 2nd edition, 2001
by: Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein
MIT Press
ISBN:
0262032937
(website)

2

cover

The Algorithm Design Manual, 2nd edition, 2008
by Steven S. Skiena
Springer
ISBN:
1848000693
(website)

3

USA Computing Olympiad (USACO) Training Gateway
by Rob Kolstad and team
(website)

3

Introduction to the Design and Analysis of Algorithms, 2nd edition, 2006
by Anany Levitin
Addison Wesley
ISBN:
0321358287

4

Algorithm Design, 2005
by Jon Kleinberg and Eva Tardos
Addison Wesley
ISBN:
0321358287

5

Algorithms in C++, 2002
by Robert Sedgewick
Addison Wesley
ISBN:
020172684X

6

Programming Challenges, 2003
by Miguel A. Revilla and Steven S. Skiena
Springer
ISBN: 0387001638
(website)

7

Programming Pearls, 1999
by Jon Bentley
Addison Wesley
ISBN: 0201657880

8

Art of Programming Contest, 2007
by Ahmed Shamsul Arefin (and me)


This document, index.html, has been accessed 22093 times since 10-Oct-07 11:47:24 SGT. This is the 6th time it has been accessed today.

A total of 9926 different hosts have accessed this document in the last 775 days; your host, 38.107.191.85, has accessed it 1 times.

If you're interested, complete statistics for this document are also available, including breakdowns by top-level domain, host name, and date.