This repository contains my personal solutions to LeetCode problems, implemented in Go (Golang).
Each problem is a standalone function located in the tasks/ directory.
The main.go file shows commented example usages for each implemented task.
leetcode/
βββ go.mod
βββ main.go
βββ README.md
βββ LICENSE
βββ tasks/
βββ 001_two_sum.go
βββ 002_add_two_numbers.go
βββ ... (other problems)
main.goβ Entry point with commented examples for all taskstasks/β Contains individual LeetCode problem solutions
Uncomment any task example in main.go and run:
go run main.go// --- LeetCode #1: Two Sum ---
// nums := []int{2, 7, 11, 15}
// target := 9
// result := tasks.TwoSum(nums, target)
// fmt.Println("Output:", result)- Each solution is implemented in idiomatic Go
- Focused on clean code and readability
This project is open-source under the MIT License.
Made with β€οΈ and Go.