Skip to content

This is where I am just reinforcing algorithm knowledge and doing it in different langs. Possibly theoretical testing of efficiency.

Notifications You must be signed in to change notification settings

JSBtechnologies/algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Algorithms

A comprehensive repository for reinforcing algorithm knowledge through implementation and experimentation across multiple programming languages.

Purpose

This repository serves as:

  • A learning platform for understanding and implementing fundamental algorithms
  • An experimental workspace for testing algorithm efficiency
  • A comparative study of algorithm implementations across different programming languages
  • A reference for Big O complexity analysis

Repository Structure

The repository follows a structured organization pattern:

algorithms/
├── {algorithm-type}/
│   ├── {language}/
│   │   └── implementation files
│   └── README.md (type-specific documentation)

Algorithm Types

Organized by category with examples:

  • sorting/ - Sorting algorithms
    • Bubble Sort, Quick Sort, Merge Sort, Heap Sort, etc.
  • searching/ - Search algorithms
    • Binary Search, Linear Search, Depth-First Search, Breadth-First Search, etc.
  • graph/ - Graph algorithms
    • Dijkstra's Algorithm, Bellman-Ford, Floyd-Warshall, etc.
  • dynamic-programming/ - Dynamic programming solutions
    • Fibonacci, Knapsack Problem, Longest Common Subsequence, etc.
  • data-structures/ - Data structure implementations
    • Trees, Heaps, Hash Tables, Linked Lists, etc.
  • string/ - String manipulation algorithms
    • Pattern Matching, String Searching, etc.

Language Support

Each algorithm type contains implementations in multiple languages:

  • python/ - Python implementations
  • javascript/ - JavaScript implementations
  • java/ - Java implementations
  • cpp/ - C++ implementations
  • go/ - Go implementations
  • rust/ - Rust implementations

Big O Complexity

Understanding time and space complexity is crucial for algorithm analysis:

Time Complexity Classes

  • O(1) - Constant time
  • O(log n) - Logarithmic time (e.g., Binary Search)
  • O(n) - Linear time (e.g., Linear Search)
  • O(n log n) - Linearithmic time (e.g., Merge Sort, Quick Sort average case)
  • O(n²) - Quadratic time (e.g., Bubble Sort, Selection Sort)
  • O(n³) - Cubic time
  • O(2ⁿ) - Exponential time
  • O(n!) - Factorial time

Performance Comparison

Each algorithm implementation should document:

  1. Best case complexity
  2. Average case complexity
  3. Worst case complexity
  4. Space complexity
  5. Practical use cases

Getting Started

  1. Navigate to the algorithm type you want to explore
  2. Choose your preferred programming language
  3. Review the implementation and complexity analysis
  4. Run tests to verify correctness
  5. Experiment with modifications

Contributing

When adding new algorithms:

  1. Follow the folder structure: {algorithm-type}/{language}/
  2. Include complexity analysis in comments
  3. Add test cases
  4. Update the relevant README files

Learning Resources

Experimentation

This repository encourages:

  • Implementing algorithms in new languages
  • Comparing performance across languages
  • Testing theoretical vs practical efficiency
  • Optimizing existing implementations

About

This is where I am just reinforcing algorithm knowledge and doing it in different langs. Possibly theoretical testing of efficiency.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •