Algorithms and Computing (using C++)

This course gives a gentle introduction (for first year undergraduate students) to algorithms together with their implementation in C++. C++ is introduced along with problems and algorithms. It is a prerequisite for the course Algorithms for the Real World. The courses uses problems from UVa Online judge to supplement the algorithmic concepts learnt. The lecture notes and C++ code can be used for self-study for anybody interested in algorithms and programming. See ``Introduction" in the lecture notes below for more information.

Lecture Notes and C++ code:

Introduction

Prime number checking

Search

IsPrime.cpp

FastIsPrime.cpp

MySqrt.cpp

Programming-tips

Recursion

gcd.cpp

maxr.cpp

Sorting

simplesort.cpp

mergesort.cpp

Fingerprinting, Hashing and Randomization 1

Fingerprinting, Hashing and Randomization 2

Fingerprinting, Hashing and Randomization 3

fingerprint.cpp

generate_random_number.cpp

uniform_vs_no_majority.cpp

generate_random_number2.cpp

almost_unanimous.cpp

Review