Skip to content

hoffhannisyan/leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧩 LeetCode Solutions in Go

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.


πŸ“ Project Structure

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 tasks
  • tasks/ β†’ Contains individual LeetCode problem solutions

πŸš€ How to Run

Uncomment any task example in main.go and run:

go run main.go

πŸ“˜ Example

// --- LeetCode #1: Two Sum ---
// nums := []int{2, 7, 11, 15}
// target := 9
// result := tasks.TwoSum(nums, target)
// fmt.Println("Output:", result)

πŸ’‘ Notes

  • Each solution is implemented in idiomatic Go
  • Focused on clean code and readability

πŸ“œ License

This project is open-source under the MIT License.


Made with ❀️ and Go.

About

Solutions to LeetCode problems written in Go (Golang), organized by task.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages