Here, I review the course “Functional Programming Principles in Scala” available at Coursera. It is offered by Professor Martin Odersky of École Polytechnique Fédérale de Lausanne (EPFL).

# Monthly Archives: June 2013

# Topological Sorting

A topological sorting of a directed graph G is a linear ordering of its vertices such that for every directed edge u->v, u comes before v in the ordering. A topological sorting is possible if and only if the graph has no directed cycles i.e., it is a Directed Acyclic Graph (DAG). It is always possible to find a topological order for a DAG and this can be done in linear time.

# Cryptography I course review

Here, I review the course “Cryptography I” available at Coursera. It is offered by Professor Dan Boneh of Stanford University.

# NFA simulation C++ implementation

Here, I provide C++ implementation of a Non-Deterministic Finite Automaton. An NFA is a finite state machine where from each state and a given input symbol, the automaton may move to several possible next states.

# Kadane’s Algorithm

Here, I describe variants of Kadane’s algorithm to solve the maximum subarray and the minimum subarray problems. The maximum subarray problem is to find the contiguous subarray having the largest sum. Likewise, the minimum subarray problem is to find the contiguous subarray having the smallest sum. Variants of Kadane’s algorithm can solve these problems in O(N) time.

# Closest pair of points problem

The closest pair problem is a problem in computational geometry where the objective is to find a pair of points having the minimum euclidean distance between them.

# CS Jokes 102

Here’s the second iteration of CS Jokes 101:

>>Two bytes meet. The first byte asks, “Are you ill?”

The second byte replies, “No, just feeling a bit off.”