$ show geemaple/leetcode
This repository is a collection of algorithmic problem solutions, primarily from LeetCode, CodeForces, and LintCode, implemented in both C++ and Python. Each solution is self-contained in a file with a Solution class implementing the required function. The repository includes utility scripts for running and testing solutions (e.g., problem.sh, python.sh, cpp.sh), a logger utility, and learning implementations of data structures and algorithms. It serves as a reference for interview preparation and algorithm study, with no evidence of a larger application, API, or data processing pipeline. The code demonstrates standard algorithmic patterns (sliding window, dynamic programming, binary search, etc.) but lacks extensive engineering infrastructure for production use.
The LLM identified 3 files worth highlighting for reuse:
Provides a simple, color-coded logging utility for Python applications. It isolates logging concerns with methods for different log levels (info, warning, error, debug) and ANSI color codes. This component is reusable across projects with minimal modification, demonstrating encapsulation of cross-cutting concerns without external dependencies.
Implements a singly linked list with core operations: get, addAtHead, addAtTail, addAtIndex, deleteAtIndex. Includes proper edge-case handling (invalid indices, empty list operations) and maintains size tracking. This reusable data structure demonstrates encapsulation and linked list manipulation patterns, suitable for extraction into projects requiring a lightweight linked list implementation.
Contains implementations of classic sorting algorithms (bubble sort, insertion sort, merge sort, quicksort) as standalone functions. Each function clearly specifies input/output behavior and includes time complexity comments. This module is reusable for educational contexts or projects needing sorting without built-ins, demonstrating algorithm implementation patterns with clear interfaces and documentation.