Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/blindlobstar/go-interview-problems
/ functions
Functions
126 in github.com/blindlobstar/go-interview-problems
⨍
Functions
126
◇
Types & classes
44
↓ 19 callers
Method
Get
(key string)
07-ttl-cache/task.go:16
↓ 14 callers
Method
Set
(key string, value string, ttl time.Duration)
07-ttl-cache/task.go:13
↓ 9 callers
Method
Stop
()
07-ttl-cache/task.go:23
↓ 8 callers
Function
NewTtlCache
()
07-ttl-cache/task.go:9
↓ 5 callers
Method
Delete
(key string)
07-ttl-cache/task.go:20
↓ 3 callers
Method
Get
(ctx context.Context, address string)
08-request-with-failover/solution/solution.go:10
↓ 3 callers
Function
NewQueue
(size int)
12-concurrent-queue-iii/task.go:11
↓ 3 callers
Method
Pop
()
12-concurrent-queue-iii/task.go:19
↓ 3 callers
Method
Push
(val int)
12-concurrent-queue-iii/task.go:15
↓ 2 callers
Method
Fetch
Fetch returns the body of URL and a slice of URLs found on that page.
03-web-crawler/solution/solution.go:10
↓ 2 callers
Function
NewQueue
(size int)
10-concurrent-queue/task.go:9
↓ 2 callers
Function
NewQueue
(size int)
11-concurrent-queue-ii/task.go:11
↓ 2 callers
Function
NewRateLimiter
(n int)
06-rate-limiter/task.go:5
↓ 2 callers
Method
Peek
()
12-concurrent-queue-iii/task.go:23
↓ 2 callers
Method
Pop
()
10-concurrent-queue/task.go:17
↓ 2 callers
Method
Pop
()
11-concurrent-queue-ii/task.go:19
↓ 2 callers
Method
Push
(val int)
10-concurrent-queue/task.go:13
↓ 2 callers
Method
Push
(val int)
11-concurrent-queue-ii/task.go:15
↓ 2 callers
Function
Walk
Walk walks the tree t sending all values from the tree to the channel ch.
02-equivalent-binary-trees/task.go:9
↓ 2 callers
Function
Walk
Walk walks the tree t sending all values from the tree to the channel ch.
02-equivalent-binary-trees/solution/solution.go:9
↓ 1 callers
Method
CanTake
()
06-rate-limiter/task.go:9
↓ 1 callers
Method
Connect
Need call Connect before Send Take time to connect
05-costly-connections-with-unsafe-storage/solution/solution.go:10
↓ 1 callers
Function
Crawl
Crawl uses fetcher to recursively crawl pages starting with url, to a maximum of depth.
03-web-crawler/task.go:11
↓ 1 callers
Method
Disconnect
Every connection should be disconnected after use Take time to disconnect
05-costly-connections-with-unsafe-storage/solution/solution.go:14
↓ 1 callers
Function
Get
Call `Getter.Get()` for each address in parallel. Returns the first successful response. If all requests fail, returns an error.
01-first-successful-key-lookup/task.go:14
↓ 1 callers
Method
Get
Cache Client.Get result
04-non-blocking-cache/task.go:19
↓ 1 callers
Method
Get
(ctx context.Context, address, key string)
01-first-successful-key-lookup/solution/solution.go:8
↓ 1 callers
Method
GetRateValues
()
13-rate-tracker/task_test.go:27
↓ 1 callers
Method
Handle
()
13-rate-tracker/task.go:13
↓ 1 callers
Function
Merge
(channels ...<-chan int)
09-merge-channels/task.go:3
↓ 1 callers
Function
NewCache
Don't update signature of NewCache
04-non-blocking-cache/task.go:13
↓ 1 callers
Method
NewConnection
Create new connection Will return error if there is more than maxConn
05-costly-connections-with-unsafe-storage/solution/solution.go:22
↓ 1 callers
Function
NewMockCreator
(max int, delay time.Duration)
05-costly-connections-with-unsafe-storage/task_test.go:52
↓ 1 callers
Function
NewMockGetter
(responses map[string]map[string]Response)
01-first-successful-key-lookup/task_test.go:22
↓ 1 callers
Function
NewUnsafeStorage
(delay time.Duration)
05-costly-connections-with-unsafe-storage/task_test.go:85
↓ 1 callers
Method
Peek
()
11-concurrent-queue-ii/task.go:23
↓ 1 callers
Function
RequestWithFailover
RequestWithFailover attempts to request a data from available addresses: 1. If error, immediately try the address without waiting 2. If an address doe
08-request-with-failover/task.go:19
↓ 1 callers
Function
Same
Same determines whether the trees t1 and t2 contain the same values.
02-equivalent-binary-trees/task.go:14
↓ 1 callers
Method
Save
Saves data to unsafe storage WILL CORRUPT DATA on concurrent save
05-costly-connections-with-unsafe-storage/solution/solution.go:28
↓ 1 callers
Method
Send
(req string)
05-costly-connections-with-unsafe-storage/solution/solution.go:16
↓ 1 callers
Function
SendAndSave
SendAndSave should send all requests concurrently using at most `maxConn` simultaneous connections. Responses must be saved using Saver.Save. Be caref
05-costly-connections-with-unsafe-storage/task.go:30
↓ 1 callers
Method
SendRate
(int)
13-rate-tracker/solution/solution.go:9
↓ 1 callers
Method
Stop
()
07-ttl-cache/solution/solution.go:61
↓ 1 callers
Method
Take
()
06-rate-limiter/task.go:13
↓ 1 callers
Method
clear
(ctx context.Context)
07-ttl-cache/solution/solution.go:65
↓ 1 callers
Function
goWalk
(t *tree.Tree, ch chan int)
02-equivalent-binary-trees/solution/solution.go:14
↓ 1 callers
Function
newMockClient
(responses map[string][]response)
04-non-blocking-cache/task_test.go:24
↓ 1 callers
Function
newMockMonitor
()
13-rate-tracker/task_test.go:15
Function
BenchmarkQueue
(b *testing.B)
12-concurrent-queue-iii/task_test.go:156
Method
CanTake
()
06-rate-limiter/solution/solution.go:14
Method
Connect
()
05-costly-connections-with-unsafe-storage/task_test.go:17
Method
Connect
Need call Connect before Send Take time to connect
05-costly-connections-with-unsafe-storage/task.go:6
Function
Crawl
Crawl uses fetcher to recursively crawl pages starting with url, to a maximum of depth.
03-web-crawler/solution/solution.go:20
Method
Delete
(key string)
07-ttl-cache/solution/solution.go:54
Method
Disconnect
()
05-costly-connections-with-unsafe-storage/task_test.go:25
Method
Disconnect
Every connection should be disconnected after use Take time to disconnect
05-costly-connections-with-unsafe-storage/task.go:10
Method
Fetch
(url string)
03-web-crawler/task_test.go:18
Method
Fetch
Fetch returns the body of URL and a slice of URLs found on that page.
03-web-crawler/task.go:6
Function
Get
Call `Getter.Get()` for each address in parallel. Returns the first successful response. If all requests fail, returns an error.
01-first-successful-key-lookup/solution/solution.go:14
Method
Get
(address string)
04-non-blocking-cache/task_test.go:35
Method
Get
(address string)
04-non-blocking-cache/task.go:4
Method
Get
(address string)
04-non-blocking-cache/solution/solution.go:8
Method
Get
(address string)
04-non-blocking-cache/solution/solution.go:27
Method
Get
(ctx context.Context, address, key string)
01-first-successful-key-lookup/task_test.go:28
Method
Get
(ctx context.Context, address, key string)
01-first-successful-key-lookup/task.go:8
Method
Get
(key string)
07-ttl-cache/solution/solution.go:42
Method
Get
(ctx context.Context, address string)
08-request-with-failover/task_test.go:20
Method
Get
(ctx context.Context, address string)
08-request-with-failover/task.go:9
Method
Handle
()
13-rate-tracker/solution/solution.go:16
Method
LogRate
(monitor Monitor, d time.Duration)
13-rate-tracker/task.go:18
Method
LogRate
(monitor Monitor, d time.Duration)
13-rate-tracker/solution/solution.go:22
Function
Merge
(channels ...<-chan int)
09-merge-channels/solution/solution.go:5
Function
NewCache
(client Client)
04-non-blocking-cache/solution/solution.go:23
Method
NewConnection
()
05-costly-connections-with-unsafe-storage/task_test.go:56
Method
NewConnection
Create new connection Will return error if there is more than maxConn
05-costly-connections-with-unsafe-storage/task.go:18
Function
NewQueue
(size int)
10-concurrent-queue/solution/solution.go:11
Function
NewQueue
(size int)
12-concurrent-queue-iii/solution/solution.go:17
Function
NewQueue
(size int)
11-concurrent-queue-ii/solution/solution.go:16
Function
NewRateLimiter
(n int)
06-rate-limiter/solution/solution.go:9
Function
NewTtlCache
()
07-ttl-cache/solution/solution.go:20
Method
Peek
()
12-concurrent-queue-iii/solution/solution.go:49
Method
Peek
()
11-concurrent-queue-ii/solution/solution.go:47
Method
Pop
()
10-concurrent-queue/solution/solution.go:24
Method
Pop
()
12-concurrent-queue-iii/solution/solution.go:36
Method
Pop
()
11-concurrent-queue-ii/solution/solution.go:34
Method
Push
(val int)
10-concurrent-queue/solution/solution.go:15
Method
Push
(val int)
12-concurrent-queue-iii/solution/solution.go:23
Method
Push
(val int)
11-concurrent-queue-ii/solution/solution.go:23
Function
RequestWithFailover
RequestWithFailover attempts to request a data from available addresses: 1. If error, immediately try the address without waiting 2. If an address doe
08-request-with-failover/solution/solution.go:20
Function
Same
Same determines whether the trees t1 and t2 contain the same values.
02-equivalent-binary-trees/solution/solution.go:25
Method
Save
(data string)
05-costly-connections-with-unsafe-storage/task_test.go:89
Method
Save
Saves data to unsafe storage WILL CORRUPT DATA on concurrent save
05-costly-connections-with-unsafe-storage/task.go:24
Method
Send
(req string)
05-costly-connections-with-unsafe-storage/task_test.go:33
Method
Send
(req string)
05-costly-connections-with-unsafe-storage/task.go:12
Function
SendAndSave
SendAndSave should send all requests concurrently using at most `maxConn` simultaneous connections. Responses must be saved using Saver.Save. Be caref
05-costly-connections-with-unsafe-storage/solution/solution.go:34
Method
SendRate
(rate int)
13-rate-tracker/task_test.go:21
Method
SendRate
(int)
13-rate-tracker/task.go:8
Method
Set
(key string, value string, ttl time.Duration)
07-ttl-cache/solution/solution.go:31
Method
Take
()
06-rate-limiter/solution/solution.go:23
Function
TestAutomaticCleanup
(t *testing.T)
07-ttl-cache/task_test.go:84
next →
1–100 of 126, ranked by callers