MCPcopy Create free account

hub / github.com/blindlobstar/go-interview-problems / functions

Functions126 in github.com/blindlobstar/go-interview-problems

↓ 19 callersMethodGet
(key string)
07-ttl-cache/task.go:16
↓ 14 callersMethodSet
(key string, value string, ttl time.Duration)
07-ttl-cache/task.go:13
↓ 9 callersMethodStop
()
07-ttl-cache/task.go:23
↓ 8 callersFunctionNewTtlCache
()
07-ttl-cache/task.go:9
↓ 5 callersMethodDelete
(key string)
07-ttl-cache/task.go:20
↓ 3 callersMethodGet
(ctx context.Context, address string)
08-request-with-failover/solution/solution.go:10
↓ 3 callersFunctionNewQueue
(size int)
12-concurrent-queue-iii/task.go:11
↓ 3 callersMethodPop
()
12-concurrent-queue-iii/task.go:19
↓ 3 callersMethodPush
(val int)
12-concurrent-queue-iii/task.go:15
↓ 2 callersMethodFetch
Fetch returns the body of URL and a slice of URLs found on that page.
03-web-crawler/solution/solution.go:10
↓ 2 callersFunctionNewQueue
(size int)
10-concurrent-queue/task.go:9
↓ 2 callersFunctionNewQueue
(size int)
11-concurrent-queue-ii/task.go:11
↓ 2 callersFunctionNewRateLimiter
(n int)
06-rate-limiter/task.go:5
↓ 2 callersMethodPeek
()
12-concurrent-queue-iii/task.go:23
↓ 2 callersMethodPop
()
10-concurrent-queue/task.go:17
↓ 2 callersMethodPop
()
11-concurrent-queue-ii/task.go:19
↓ 2 callersMethodPush
(val int)
10-concurrent-queue/task.go:13
↓ 2 callersMethodPush
(val int)
11-concurrent-queue-ii/task.go:15
↓ 2 callersFunctionWalk
Walk walks the tree t sending all values from the tree to the channel ch.
02-equivalent-binary-trees/task.go:9
↓ 2 callersFunctionWalk
Walk walks the tree t sending all values from the tree to the channel ch.
02-equivalent-binary-trees/solution/solution.go:9
↓ 1 callersMethodCanTake
()
06-rate-limiter/task.go:9
↓ 1 callersMethodConnect
Need call Connect before Send Take time to connect
05-costly-connections-with-unsafe-storage/solution/solution.go:10
↓ 1 callersFunctionCrawl
Crawl uses fetcher to recursively crawl pages starting with url, to a maximum of depth.
03-web-crawler/task.go:11
↓ 1 callersMethodDisconnect
Every connection should be disconnected after use Take time to disconnect
05-costly-connections-with-unsafe-storage/solution/solution.go:14
↓ 1 callersFunctionGet
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 callersMethodGet
Cache Client.Get result
04-non-blocking-cache/task.go:19
↓ 1 callersMethodGet
(ctx context.Context, address, key string)
01-first-successful-key-lookup/solution/solution.go:8
↓ 1 callersMethodGetRateValues
()
13-rate-tracker/task_test.go:27
↓ 1 callersMethodHandle
()
13-rate-tracker/task.go:13
↓ 1 callersFunctionMerge
(channels ...<-chan int)
09-merge-channels/task.go:3
↓ 1 callersFunctionNewCache
Don't update signature of NewCache
04-non-blocking-cache/task.go:13
↓ 1 callersMethodNewConnection
Create new connection Will return error if there is more than maxConn
05-costly-connections-with-unsafe-storage/solution/solution.go:22
↓ 1 callersFunctionNewMockCreator
(max int, delay time.Duration)
05-costly-connections-with-unsafe-storage/task_test.go:52
↓ 1 callersFunctionNewMockGetter
(responses map[string]map[string]Response)
01-first-successful-key-lookup/task_test.go:22
↓ 1 callersFunctionNewUnsafeStorage
(delay time.Duration)
05-costly-connections-with-unsafe-storage/task_test.go:85
↓ 1 callersMethodPeek
()
11-concurrent-queue-ii/task.go:23
↓ 1 callersFunctionRequestWithFailover
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 callersFunctionSame
Same determines whether the trees t1 and t2 contain the same values.
02-equivalent-binary-trees/task.go:14
↓ 1 callersMethodSave
Saves data to unsafe storage WILL CORRUPT DATA on concurrent save
05-costly-connections-with-unsafe-storage/solution/solution.go:28
↓ 1 callersMethodSend
(req string)
05-costly-connections-with-unsafe-storage/solution/solution.go:16
↓ 1 callersFunctionSendAndSave
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 callersMethodSendRate
(int)
13-rate-tracker/solution/solution.go:9
↓ 1 callersMethodStop
()
07-ttl-cache/solution/solution.go:61
↓ 1 callersMethodTake
()
06-rate-limiter/task.go:13
↓ 1 callersMethodclear
(ctx context.Context)
07-ttl-cache/solution/solution.go:65
↓ 1 callersFunctiongoWalk
(t *tree.Tree, ch chan int)
02-equivalent-binary-trees/solution/solution.go:14
↓ 1 callersFunctionnewMockClient
(responses map[string][]response)
04-non-blocking-cache/task_test.go:24
↓ 1 callersFunctionnewMockMonitor
()
13-rate-tracker/task_test.go:15
FunctionBenchmarkQueue
(b *testing.B)
12-concurrent-queue-iii/task_test.go:156
MethodCanTake
()
06-rate-limiter/solution/solution.go:14
MethodConnect
()
05-costly-connections-with-unsafe-storage/task_test.go:17
MethodConnect
Need call Connect before Send Take time to connect
05-costly-connections-with-unsafe-storage/task.go:6
FunctionCrawl
Crawl uses fetcher to recursively crawl pages starting with url, to a maximum of depth.
03-web-crawler/solution/solution.go:20
MethodDelete
(key string)
07-ttl-cache/solution/solution.go:54
MethodDisconnect
()
05-costly-connections-with-unsafe-storage/task_test.go:25
MethodDisconnect
Every connection should be disconnected after use Take time to disconnect
05-costly-connections-with-unsafe-storage/task.go:10
MethodFetch
(url string)
03-web-crawler/task_test.go:18
MethodFetch
Fetch returns the body of URL and a slice of URLs found on that page.
03-web-crawler/task.go:6
FunctionGet
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
MethodGet
(address string)
04-non-blocking-cache/task_test.go:35
MethodGet
(address string)
04-non-blocking-cache/task.go:4
MethodGet
(address string)
04-non-blocking-cache/solution/solution.go:8
MethodGet
(address string)
04-non-blocking-cache/solution/solution.go:27
MethodGet
(ctx context.Context, address, key string)
01-first-successful-key-lookup/task_test.go:28
MethodGet
(ctx context.Context, address, key string)
01-first-successful-key-lookup/task.go:8
MethodGet
(key string)
07-ttl-cache/solution/solution.go:42
MethodGet
(ctx context.Context, address string)
08-request-with-failover/task_test.go:20
MethodGet
(ctx context.Context, address string)
08-request-with-failover/task.go:9
MethodHandle
()
13-rate-tracker/solution/solution.go:16
MethodLogRate
(monitor Monitor, d time.Duration)
13-rate-tracker/task.go:18
MethodLogRate
(monitor Monitor, d time.Duration)
13-rate-tracker/solution/solution.go:22
FunctionMerge
(channels ...<-chan int)
09-merge-channels/solution/solution.go:5
FunctionNewCache
(client Client)
04-non-blocking-cache/solution/solution.go:23
MethodNewConnection
()
05-costly-connections-with-unsafe-storage/task_test.go:56
MethodNewConnection
Create new connection Will return error if there is more than maxConn
05-costly-connections-with-unsafe-storage/task.go:18
FunctionNewQueue
(size int)
10-concurrent-queue/solution/solution.go:11
FunctionNewQueue
(size int)
12-concurrent-queue-iii/solution/solution.go:17
FunctionNewQueue
(size int)
11-concurrent-queue-ii/solution/solution.go:16
FunctionNewRateLimiter
(n int)
06-rate-limiter/solution/solution.go:9
FunctionNewTtlCache
()
07-ttl-cache/solution/solution.go:20
MethodPeek
()
12-concurrent-queue-iii/solution/solution.go:49
MethodPeek
()
11-concurrent-queue-ii/solution/solution.go:47
MethodPop
()
10-concurrent-queue/solution/solution.go:24
MethodPop
()
12-concurrent-queue-iii/solution/solution.go:36
MethodPop
()
11-concurrent-queue-ii/solution/solution.go:34
MethodPush
(val int)
10-concurrent-queue/solution/solution.go:15
MethodPush
(val int)
12-concurrent-queue-iii/solution/solution.go:23
MethodPush
(val int)
11-concurrent-queue-ii/solution/solution.go:23
FunctionRequestWithFailover
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
FunctionSame
Same determines whether the trees t1 and t2 contain the same values.
02-equivalent-binary-trees/solution/solution.go:25
MethodSave
(data string)
05-costly-connections-with-unsafe-storage/task_test.go:89
MethodSave
Saves data to unsafe storage WILL CORRUPT DATA on concurrent save
05-costly-connections-with-unsafe-storage/task.go:24
MethodSend
(req string)
05-costly-connections-with-unsafe-storage/task_test.go:33
MethodSend
(req string)
05-costly-connections-with-unsafe-storage/task.go:12
FunctionSendAndSave
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
MethodSendRate
(rate int)
13-rate-tracker/task_test.go:21
MethodSendRate
(int)
13-rate-tracker/task.go:8
MethodSet
(key string, value string, ttl time.Duration)
07-ttl-cache/solution/solution.go:31
MethodTake
()
06-rate-limiter/solution/solution.go:23
FunctionTestAutomaticCleanup
(t *testing.T)
07-ttl-cache/task_test.go:84
next →1–100 of 126, ranked by callers