Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/edwin-luijten/leetcode
Leetcode challenges
https://github.com/edwin-luijten/leetcode
Last synced: about 2 months ago
JSON representation
Leetcode challenges
- Host: GitHub
- URL: https://github.com/edwin-luijten/leetcode
- Owner: Edwin-Luijten
- Created: 2023-10-07T15:17:15.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-09T11:14:52.000Z (about 1 year ago)
- Last Synced: 2023-10-09T16:27:17.302Z (about 1 year ago)
- Language: Go
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# LeetCode
Solutions and Benchmarks---
## Getting Started
> Install gobenchdata to parse benchmark results and create a bench.json
> ```bash
> go install go.bobheadxi.dev/gobenchdata@latest
> ```
> Build parser
> ```bash
> make build-parser
> ```
> Run benchmarks & tests
> ```bash
> make run
> ```
> Create a new challenge
> ```bash
> make new challenge="foo bar"
> ```## Challenges
[ADD TWO NUMBERS](#add_two_numbers)
[LONGEST SUBSTRING WITHOUT REPEATING CHARACTERS](#longest_substring_without_repeating_characters)
[MEDIAN OF TWO SORTED ARRAYS](#median_of_two_sorted_arrays)
[TWO SUM](#two_sum)## [ADD TWO NUMBERS](./add_two_numbers)
Runs: 9750609
| Name | ns/op | B/op | allocs/op |
| ---- | ----- | ---- | --------- |
| BenchmarkAddTwoNumbers-2 | 124.200000 ns/op | 48.000000 B/op | 3.000000 allocs/op |## [LONGEST SUBSTRING WITHOUT REPEATING CHARACTERS](./longest_substring_without_repeating_characters)
Runs: 36441670
| Name | ns/op | B/op | allocs/op |
| ---- | ----- | ---- | --------- |
| BenchmarkLongestSubstringWithoutRepeatingCharacters-2 | 31.950000 ns/op | 0.000000 B/op | 0.000000 allocs/op |## [MEDIAN OF TWO SORTED ARRAYS](./median_of_two_sorted_arrays)
Runs: 21198352
| Name | ns/op | B/op | allocs/op |
| ---- | ----- | ---- | --------- |
| BenchmarkTestFindMedianSortedArrays-2 | 55.870000 ns/op | 32.000000 B/op | 1.000000 allocs/op |## [TWO SUM](./two_sum)
Runs: 8820580
| Name | ns/op | B/op | allocs/op |
| ---- | ----- | ---- | --------- |
| BenchmarkTwoSum-2 | 135.100000 ns/op | 16.000000 B/op | 1.000000 allocs/op |