Skip to content

Edwin-Luijten/leetcode

Repository files navigation

LeetCode

Solutions and Benchmarks


Getting Started

Install gobenchdata to parse benchmark results and create a bench.json

go install go.bobheadxi.dev/gobenchdata@latest

Build parser

make build-parser

Run benchmarks & tests

make run

Create a new challenge

make new challenge="foo bar" 

Challenges

ADD TWO NUMBERS
LONGEST SUBSTRING WITHOUT REPEATING CHARACTERS
MEDIAN OF TWO SORTED ARRAYS
TWO SUM

Runs: 9750609

Name ns/op B/op allocs/op
BenchmarkAddTwoNumbers-2 124.200000 ns/op 48.000000 B/op 3.000000 allocs/op

Runs: 36441670

Name ns/op B/op allocs/op
BenchmarkLongestSubstringWithoutRepeatingCharacters-2 31.950000 ns/op 0.000000 B/op 0.000000 allocs/op

Runs: 21198352

Name ns/op B/op allocs/op
BenchmarkTestFindMedianSortedArrays-2 55.870000 ns/op 32.000000 B/op 1.000000 allocs/op

Runs: 8820580

Name ns/op B/op allocs/op
BenchmarkTwoSum-2 135.100000 ns/op 16.000000 B/op 1.000000 allocs/op

About

Leetcode challenges

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published