Skip to content

ghosthouse7/GO-LEETCODE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

22 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ GO-LEETCODE

Go Status License Repo Size Last Commit

"Talk is cheap. Show me the code." -Linus Torvalds

πŸ“– About This Repository:

This repository serves as a centralized collection of my LeetCode solutions and Data Structures & Algorithms (DSA) implementations, written exclusively in Golang.

The focus of this project is not just to solve problems, but to write production-grade, idiomatic Go code.

🌟 Key Features:

  • Idiomatic Go: Utilizes extensive use of Pointers, Interfaces, and Structs.
  • Concurrency Patterns: Solutions involving Goroutines, Channels, and Mutexes where applicable.
  • Performance: Detailed Time ($O$) and Space ($O$) complexity analysis for every solution.
  • Unit Testing: Comprehensive _test.go files for robust verification.

πŸ“‚ Repository Structure:

The codebase is organized by algorithmic patterns to facilitate easy navigation and learning:

πŸ“¦ GO-LEETCODE
 ┣ πŸ“‚ arrays          # Two Pointers, Sliding Window
 ┣ πŸ“‚ strings         # String Manipulation, Hashing
 ┣ πŸ“‚ linked-list     # Fast/Slow Pointers, Reversal
 ┣ πŸ“‚ trees           # DFS, BFS, BST Logic
 ┣ πŸ“‚ concurrency     # Goroutines, WaitGroups, Channels
 ┣ πŸ“‚ dynamic-prog    # Memoization & Tabulation
 β”— πŸ“œ README.md

# Problem Name Pattern Difficulty Time Complexity Space Complexity
1 Longest Substring Without Repeating Characters Sliding Window 🟠 Medium $O(N)$ $O(1)$
2 Two Sum Hash Map 🟒 Easy $O(N)$ $O(N)$
3 Merge k Sorted Lists Heap / D&C πŸ”΄ Hard $O(N \log k)$ $O(k)$

Tech Stack

  • Language: Golang (1.26.0)
  • Testing: Native go test framework
  • Linting: golangci-lint

πŸš€ How to Run To run the solution for a specific problem or package:

Clone the repository

git clone [https://github.com/ghosthouse7/GO-LEETCODE.git](https://github.com/ghosthouse7/GO-LEETCODE.git)

# Navigate to the directory
cd GO-LEETCODE

# Run tests for a specific package (e.g., strings)
go test -v ./strings


🀝 Contribution & Connect
I welcome discussions on code optimization and alternative approaches.
If you find a bug or have a more optimized solution (O(1) space, anyone?), feel free to open a Pull Request.
Author: ghost_hunter
GitHub: ghosthouse7
Crafted with ❀️ and code by ghost_hunter

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors