Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Algo SenseNew to Visual Studio Code? Get it now.
Algo Sense

Algo Sense

Codetown

|
26 installs
| (0) | Free
Comprehensive algorithm learning extension with implementations in multiple programming languages
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

🚀 Algo Sense

A comprehensive VS Code extension for learning and exploring algorithms with implementations in multiple programming languages.

✨ Features

  • 📚 Comprehensive Algorithm Library: Access to 26+ sorting algorithms, 14+ searching algorithms, 22+ number theory algorithms, and 19+ matrix & linear algebra algorithms (80+ total algorithms)
  • 🌍 Multi-Language Support: Implementations in JavaScript, Python, and Java
  • 🎯 Interactive Dashboard: Beautiful, modern interface with space-themed design
  • 🔍 Enhanced Search Service: Advanced fuzzy search with scoring, field matching, and intelligent ranking
  • 📊 Detailed Analysis: Time complexity, space complexity, advantages, disadvantages, and use cases
  • 💻 Code Integration: Copy algorithm implementations directly to clipboard
  • 🎨 Modern UI: Dark theme with glass effects and smooth animations
  • 📝 Algorithm History: Comprehensive timeline of algorithm development in computer science
  • 🔒 Security-First: Built with Content Security Policy and XSS protection
  • 📱 Responsive Design: Works seamlessly across different screen sizes

📦 Installation

From VS Code Marketplace

  1. Open VS Code
  2. Go to Extensions (Ctrl+Shift+X)
  3. Search for "Algo Sense"
  4. Click Install

From Source

  1. Clone this repository
  2. Run npm install
  3. Run npm run compile
  4. Press F5 to launch the extension in a new VS Code window

🎮 Usage

Activity Bar

  • Click the Algo Sense icon in the VS Code activity bar (left sidebar)
  • Explore algorithms by category in the Algorithm Explorer
  • View the Dashboard for an overview of all algorithms
  • Check Algorithm Details for comprehensive information
  • Access Algorithm History for historical development timeline

Command Palette

  • Press Ctrl+Shift+P (or Cmd+Shift+P on Mac)
  • Type "Algo Sense" to see available commands:
    • Algo Sense: Open Algo Sense Dashboard
    • Algo Sense: Show Algorithm History
    • Algo Sense: Search Algorithm
    • Algo Sense: Show Algorithm Details

Dashboard Features

  • Category Cards: Browse algorithms by category with modern glass design
  • Enhanced Search Bar: Advanced fuzzy search with real-time results and scoring
  • Statistics: View total algorithms, categories, and supported languages
  • Quick Access: Click on any algorithm to view detailed information
  • Space Theme: Beautiful dark blue gradient background with glass effects

🔍 Search Features

  • Fuzzy Search: Find algorithms even with typos or partial matches
  • Multi-Field Search: Search across name, description, category, tags, and complexity
  • Intelligent Scoring: Results ranked by relevance with percentage match scores
  • Real-Time Results: Instant search results as you type
  • Field Highlighting: Matched fields are highlighted in search results
  • Match Types: Visual indicators for exact, partial, and fuzzy matches
  • Backend Processing: Search logic moved to TypeScript for better performance and consistency

Algorithm Details

  • Complexity Analysis: Clean Big O notation display (Best, Average, Worst Case, Space Complexity)
  • Multi-Language Implementations: Switch between JavaScript, Python, and Java
  • Pseudocode: Step-by-step algorithm explanation
  • Use Cases: Real-world applications and scenarios
  • Advantages & Disadvantages: Comprehensive analysis
  • Code Actions: Copy code to clipboard with one click
  • Tab System: Easy navigation between different implementations
  • Info Button: Access detailed algorithm information including overview, complexity analysis, use cases, and implementation tips

📚 Current Algorithm Library

🔄 Sorting Algorithms (26 Algorithms)

Elementary Sort

  • Bubble Sort - Simple comparison-based sorting
  • Selection Sort - In-place comparison sorting
  • Insertion Sort - Builds final array one item at a time

Divide & Conquer

  • Merge Sort - Stable, divide-and-conquer algorithm
  • Quick Sort - Efficient, in-place sorting
  • Three-Way Quick Sort - Handles duplicate elements efficiently

Heap-Based

  • Heap Sort - In-place sorting using heap data structure

Non-Comparison

  • Counting Sort - Integer sorting with linear time complexity
  • Radix Sort - Digit-based sorting algorithm
  • Bucket Sort - Distribution-based sorting
  • Pigeonhole Sort - Similar to counting sort

Hybrid

  • Timsort - Hybrid of merge sort and insertion sort
  • Intro Sort - Hybrid of quick sort, heap sort, and insertion sort
  • Shell Sort - Improves insertion sort with gap sequence

Stable vs. Unstable

  • Cycle Sort - In-place, unstable sorting
  • Cocktail Shaker Sort - Bidirectional bubble sort
  • Gnome Sort - Simple comparison-based algorithm
  • Comb Sort - Improves bubble sort with gap sequence
  • Odd-Even Sort - Parallel sorting algorithm

Rare/Theoretical

  • Binary Insertion Sort - Uses binary search for insertion
  • Block Sort (GrailSort) - In-place merge sort variant
  • Bitonic Sort - Parallel sorting algorithm
  • Odd-Even Merge Sort - Parallel merge sort variant
  • Patience Sort - Card game-inspired sorting
  • Strand Sort - Recursive sorting algorithm

🔍 Searching Algorithms (14 Algorithms)

Basic Search

  • Linear Search - Simple sequential search
  • Binary Search - Efficient sorted array search

Graph/Tree Search

  • Depth-First Search (DFS) - Graph traversal algorithm
  • Breadth-First Search (BFS) - Level-order graph traversal
  • Greedy Best-First Search - Heuristic-based search

String/Pattern Search

  • Jump Search - Block-based search algorithm
  • Order-agnostic Binary Search - Works on sorted arrays in any order
  • Interpolation Search - Improvement over binary search
  • Exponential Search - Unbounded binary search
  • Sentinel Linear Search - Optimized linear search
  • Fibonacci Search - Uses Fibonacci numbers for search
  • Rabin–Karp Algorithm - String pattern matching
  • Knuth–Morris–Pratt (KMP) - Efficient string matching
  • Boyer–Moore String-Search - Fast string search algorithm

Data Structure Based Search

  • Hash Table / Hashing - Constant-time average case search

🔢 Number Theory Algorithms (22 Algorithms)

Prime Number Testing

  • Trial Division - Simple primality test by checking divisibility from 2 to √n
  • Optimized Trial Division - Enhanced version with wheel factorization (6k±1 pattern)
  • Sieve of Eratosthenes - Efficient algorithm for finding all primes up to n
  • Segmented Sieve - Memory-efficient algorithm for finding primes in large ranges
  • Fermat Primality Test - Probabilistic test based on Fermat's Little Theorem
  • Miller-Rabin Primality Test - Advanced probabilistic test that handles Carmichael numbers

Greatest Common Divisor (GCD)

  • Euclidean Algorithm - Classic GCD algorithm with iterative and recursive versions
  • Extended Euclidean Algorithm - Finds Bézout coefficients (ax + by = gcd(a,b))
  • Binary Euclidean Algorithm - Optimized version using bit operations for large numbers

Least Common Multiple (LCM)

  • LCM using GCD - Mathematical relationship LCM(a,b) = |a×b|/GCD(a,b)
  • Multiple Numbers LCM - Efficiently calculates LCM for arrays of numbers

Modular Arithmetic

  • Modular Exponentiation - Efficiently computes large powers modulo n (essential for cryptography)
  • Chinese Remainder Theorem - Solves systems of simultaneous congruences (used in RSA decryption)
  • Modular Multiplicative Inverse - Finds the modular inverse using Extended Euclidean Algorithm and Fermat's Little Theorem
  • Linear Congruence Solver - Solves linear congruences of the form ax ≡ b (mod m) with multiple solutions

Factorization

  • Pollard's Rho Algorithm - Probabilistic integer factorization algorithm for finding small prime factors
  • Prime Factorization - Complete prime factorization of a number with optimized implementations
  • Prime Factorization LCM - Calculate LCM using prime factorization method
  • Trial Division Factorization - Simple factorization method testing divisibility up to √n
  • Fermat's Factorization - Factorization based on difference of squares, effective for close factors
  • Quadratic Sieve (QS) - Sophisticated factorization using linear algebra and smooth numbers

Special Prime Numbers

  • Mersenne Primes - Prime numbers of the form 2^p - 1, tested using the Lucas-Lehmer test
  • Fermat Numbers - Numbers of the form 2^(2^n) + 1, tested using Pepin's test

Special Numbers

  • Perfect Numbers - Numbers equal to the sum of their proper divisors (e.g., 6, 28, 496)
  • Amicable Numbers - Pairs of numbers where each is the sum of the other's proper divisors

🧮 Matrix and Linear Algebra Algorithms (19 Algorithms)

Basic Operations

  • Matrix Addition - Element-wise addition of two matrices with the same dimensions
  • Matrix Multiplication - Standard matrix multiplication using triple nested loops
  • Determinant Calculation - Computes the determinant of square matrices (1×1, 2×2, 3×3)
  • Matrix Transpose - Flips a matrix over its main diagonal, switching row and column indices
  • Matrix Trace - Calculates the sum of diagonal elements of a square matrix
  • Matrix Creation (Diagonal & Identity) - Creates diagonal matrices from vectors and identity matrices
  • Matrix Symmetry Check - Verifies if a square matrix is symmetric (A = A^T) or skew-symmetric (A = -A^T)
  • Triangular Matrix Check - Verifies if a square matrix is upper triangular (zeros below diagonal) or lower triangular (zeros above diagonal)

Advanced Operations

  • Matrix Inverse (Gauss-Jordan Elimination) - Finds the inverse of a square matrix using augmented matrices and row operations
  • Matrix Inverse (Adjoint & Cofactor) - Computes matrix inverse using cofactor matrix and adjugate method
  • Eigenvalue & Eigenvector (Power Iteration) - Finds the dominant eigenvalue and eigenvector using iterative power method
  • LU Decomposition (PLU) - Factors a square matrix into permutation, lower and upper triangular matrices with partial pivoting for numerical stability
  • QR Decomposition - Decomposes a matrix into orthogonal and upper triangular matrices using Gram-Schmidt process
  • Diagonalization Check - Validates if a square matrix can be diagonalized by verifying if P^(-1)AP results in a diagonal matrix
  • Cramer's Rule - Solves systems of linear equations using determinants for 2×2 and 3×3 systems
  • Gaussian Elimination - Solves systems of linear equations by transforming augmented matrix into row-echelon form with partial pivoting
  • Cholesky Decomposition - Decomposes symmetric positive-definite matrices into LL^T form for efficient linear system solving
  • Gauss-Seidel - Iterative method for solving linear systems using updated values immediately for faster convergence
  • Jacobi Iteration Method - Classical iterative method that updates all variables simultaneously, suitable for parallel computation

🛠️ Development

Prerequisites

  • Node.js (v14 or higher)
  • VS Code
  • TypeScript

Setup

# Install dependencies
npm install

# Compile TypeScript
npm run compile

# Watch for changes
npm run watch

# Package extension
npx vsce package

🎨 Customization

Adding New Algorithms

  1. Open src/data/SortingAlgorithmData.ts or src/data/SearchingAlgorithmData.ts
  2. Add your algorithm to the appropriate initializeAlgorithms() method
  3. Follow the existing pattern for structure and implementations

Adding New Programming Languages

  1. Update the implementation structure in algorithm data files
  2. Add your language implementation to the algorithm data

Search Service Architecture

The extension now uses a dedicated SearchService class that provides:

  • Consistent Search Logic: Same search behavior across all components
  • Configurable Options: Customizable search parameters and thresholds
  • Performance Optimization: Efficient algorithms with proper scoring
  • Extensible Design: Easy to add new search features and algorithms
  • Type Safety: Full TypeScript support with proper interfaces

The search service supports:

  • Fuzzy matching using Levenshtein distance
  • Multi-field search with weighted scoring
  • Category and complexity-specific searches
  • Configurable result limits and minimum scores

🔒 Security Features

  • Content Security Policy (CSP): Prevents XSS attacks
  • XSS Protection: HTML escaping for dynamic content
  • Clickjacking Protection: X-Frame-Options headers
  • MIME Sniffing Protection: X-Content-Type-Options headers
  • Referrer Policy: Controls referrer information
  • Webview Security: Restricted local resource access

🤝 Contributing

We welcome contributions! Please feel free to submit issues, feature requests, or pull requests.

Contributing Guidelines

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • VS Code team for the excellent extension API
  • The open-source community for algorithm implementations
  • All contributors who help improve this extension

⚠️ Disclaimer

Algo Sense is developed for educational and entertainment purposes only. While we strive to provide accurate algorithm implementations and information, there may be errors or inaccuracies. Please use this extension with caution and verify any critical implementations before using them in production environments.

The developers are not responsible for any issues, bugs, or consequences that may arise from the use of this extension.

Made with ❤️ for the developer community

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft