$ show omonimus1/competitive-programming
This repository is a collection of competitive programming solutions and learning resources accumulated during interview preparation for a Microsoft SWE role. It contains implementations of algorithms and data structures from platforms like LeetCode, HackerRank, CodeChef, and others, organized by problem source and topic. The repository serves as both a personal record of solved problems and a reference for common coding interview patterns. The codebase consists of standalone solution files that implement specific algorithms to solve well-defined problems. Rather than a unified application, it's an educational repository where each file represents a self-contained solution to a particular coding challenge. The solutions demonstrate various techniques including two-pointer approaches, stack-based algorithms, in-place array modifications, and thread synchronization patterns. While the repository doesn't contain a single cohesive software system, it does include several reusable algorithmic patterns that could be extracted for use in other projects. Notable examples include the stack-based parentheses validation, two-pointer technique for sorted arrays, in-place array modification algorithms, and thread coordination mechanisms using Events and Semaphores. These components represent fundamental computer science concepts implemented with attention to correctness and efficiency.
The LLM identified 4 files worth highlighting for reuse:
Implements an efficient O(n) solution for validating balanced parentheses using a stack. Demonstrates proper handling of matching pairs with push/pop operations and edge case detection.
Solves the Two Sum II problem using the two-pointer technique on a sorted array, achieving O(n) time complexity with O(1) space. Shows how to leverage sorted order for efficient pair finding.
Implements an in-place element removal algorithm using two pointers, achieving O(n) time and O(1) space complexity. Demonstrates how to modify arrays without extra space by tracking valid elements.
Provides a clean implementation of thread coordination using threading.Event objects to ensure execution order. Shows proper use of synchronization primitives for inter-thread communication.