Skip to content

Personal solutions in C to the exercises from "Real-World Algorithms" by Panos Louridas, with unit tests.

Notifications You must be signed in to change notification settings

hijackeel/real-world-algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 

Repository files navigation

real-world-algorithms

Personal solutions in C to the exercises from Real-World Algorithms by Panos Louridas (not me).

Paraphrased assignments and notes on implementation are below.

1.1 Implement an array-based stack.

There are size_t, double, and char versions - used by exercises 1.2, 1.3, and 1.4, respectively. There is also a generic version.

1.2 Implement and benchmark O(n) and O(n^2) algorithms for the Stock Span Problem.

A comment in one of the files details the Stock Span Problem. libcurl is used to download real stock market data from Alpha Vantage, which requires a free API key. A shell script profiles the algorithms with Callgrind.

1.3 Write an RPN calculator.

1.4 Write a program to determine whether a sequence of open/close delimiters such as (){[](){}} is properly matched.

2.1 Implement a singly linked list.

Each node in the list contains a void pointer to data, instead of the data itself, so that the list is generic.

2.2 Implement an array-based queue.

2.3 Implement depth-first search (either recursively or not) and breadth-first search using an adjacency matrix representation.

About

Personal solutions in C to the exercises from "Real-World Algorithms" by Panos Louridas, with unit tests.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published