Skip to content

mmarouen/IntroductionToAlgorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction to algorithms implementations and solutions

This book is a review and implementation of the famous book.
All the content of the book is shared for educational purposes for the benefit of the readers.
Please feel free to share or use :)

Scope

The book is overreaching into several programming branches or disciplines: Complexity theory, runtime, algorithmic aspect..
In this implementation, Im mainly focused on the "data science" aspect of the book.
By this is meant solving the problem using different algorithms where each implementation exploits a different paradigm but not necessarily focusing on the "optimal" runtime or complexity.

For example, chapter 4 adresses matrix multiplication algorithms using mainly a direct method and several recursive methods.
In the current implementation, one algorithms from each method is written.
Additionally, the chapter also dives into the runtime and complexity of each method in detail. These aspect are skipped from the implementation.

Content

Each chapter is associated with a runnable calling the algorithmic implementations.
The user is of course free to add additional runnables.
The repository is broken down into chapters where each contains the algorithms that were presented within.
Whenever relevant a chapter exercice solutions are included as pdfs under the exercicesfolder.
The table of content below links the header files associated with each chapter along with the relevant runnable and a brief description of the algorithms implemented.

Chapter Runnable Algorithms exercice solutions
Chapter2 sorter - Insert sort algorithm
- Merge sort algorithm
Chapter4 multiplier - Classical matrix multiplication
- Recursive matrix multiplication
- Initiatation to probabalistic algorithms Chapter5
Chapter6 sorter - Wider selection of sorting algorithms Chapter6
Chapter10 data_structures - Chained lists
- Binary trees
Chapter12 bst_tester - Binary search trees
Chapter14 dynamic_programming - Cutrod problem implementation
- Longest common sequence
- Exercice 14.2 Palindrom sequence
- Exercice 14.3 Shortest bitonic path
- Exercice 14.7 Viterbi algorithm
- Exercice 14.10 Optimal investment strategy
Chapter15 greedy_algorithms greedy algrithms and dynamic programming - Activity selection problem
- Binary knapsack problen using dynamic programming
Chapter20 graphs_tester - Graph data structure definition
- Breadth first search
- Depth first search
most exercices are answered in the implementations

Prerequisites

  • c++
  • CMake

WARNING: Implementation was tested on a Ubuntu 20 machine