This repository contains solutions to various LeetCode problems implemented in Go. Each problem is organized into its own directory under the exercises/ folder, with separate files for the solution and its corresponding tests.
-
Clone the repository:
git clone https://github.com/august346/leetcode-go.git cd leetcode-go -
Install dependencies:
go mod tidy
-
Run a specific test:
go test ./exercises/ex926 -
Run all tests:
go test ./...
The utils/ folder contains helper functions:
InTime: Ensures a test completes within a specified duration.ReadStringFromFile: Reads the content of a file as a string.
- Solution: exercises/ex926/solution.go
- Solution: exercises/ex904/solution.go
- Solution: exercises/ex838/solution.go
- Solution: exercises/ex153/solution.go
- Solution: exercises/ex1560/solution.go
This project is licensed under the MIT License. See the LICENSE file for details.