MCPcopy Create free account

hub / github.com/RezaSi/go-interview-practice / functions

Functions12,886 in github.com/RezaSi/go-interview-practice

↓ 4 callersMethodElements
Elements returns a slice containing all elements in the set
challenge-27/submissions/cep-ter/solution-template.go:184
↓ 4 callersMethodElements
Elements returns a slice containing all elements in the set
challenge-27/submissions/ashwinipatankar/solution-template.go:241
↓ 4 callersMethodElements
Elements returns a slice containing all elements in the set
challenge-27/submissions/JackDalberg/solution-template.go:181
↓ 4 callersFunctionExpensiveCalculation
ExpensiveCalculation performs a computation with redundant work It computes the sum of all fibonacci numbers up to n TODO: Optimize this function to b
challenge-16/solution-template.go:60
↓ 4 callersFunctionFahrenheitToCelsius
FahrenheitToCelsius converts a temperature from Fahrenheit to Celsius Formula: C = (F - 32) × 5/9
challenge-18/solution-template.go:29
↓ 4 callersMethodGetAll
()
packages/gin/challenge-1-basic-routing/submissions/PolinaSvet/solution.go:44
↓ 4 callersMethodGetAuditTrail
GetAuditTrail retrieves audit trail for compliance
packages/mongodb/challenge-5-transactions-advanced/solution-template.go:210
↓ 4 callersMethodGetByID
(id int)
packages/gin/challenge-1-basic-routing/submissions/PolinaSvet/solution.go:45
↓ 4 callersMethodGetIndexUsageStats
GetIndexUsageStats retrieves index usage statistics for optimization
packages/mongodb/challenge-4-indexing-performance/solution-template.go:203
↓ 4 callersFunctionGetLISElements
GetLISElements returns one possible longest increasing subsequence (not just the length, but the actual elements).
challenge-24/solution-template.go:59
↓ 4 callersMethodGetPackage
(packageID string)
web-ui/internal/services/package.go:463
↓ 4 callersFunctionGetPostsByCategoryWithUserInfo
GetPostsByCategoryWithUserInfo retrieves posts by category with pagination and user info
packages/gorm/challenge-4-advanced-queries/solution-template.go:59
↓ 4 callersMethodGetProductPerformance
GetProductPerformance analyzes product performance with customer data
packages/mongodb/challenge-3-aggregation-pipeline/solution-template.go:147
↓ 4 callersMethodGetSalesByCategory
GetSalesByCategory calculates total sales per category using aggregation
packages/mongodb/challenge-3-aggregation-pipeline/solution-template.go:91
↓ 4 callersFunctionGetUserByID
GetUserByID retrieves a user by ID using generics API
packages/gorm/challenge-5-generics/solution-template.go:58
↓ 4 callersMethodHandleAuthorize
HandleAuthorize handles the authorization endpoint
challenge-15/solution-template.go:146
↓ 4 callersFunctionInefficientStringBuilder
InefficientStringBuilder builds a string by repeatedly concatenating TODO: Optimize this function to be more efficient
challenge-16/solution-template.go:37
↓ 4 callersFunctionKMPSearch
KMPSearch implements the Knuth-Morris-Pratt algorithm to find pattern in text. Returns a slice of all starting indices where the pattern is found.
challenge-23/solution-template.go:50
↓ 4 callersMethodLess
(i, j int)
challenge-10/solution-template_test.go:443
↓ 4 callersMethodListIndexes
ListIndexes retrieves all indexes on the collection with detailed information
packages/mongodb/challenge-4-indexing-performance/solution-template.go:109
↓ 4 callersMethodLoadSponsors
LoadSponsors loads sponsor list by scraping the public GitHub sponsors page
web-ui/internal/handlers/api.go:52
↓ 4 callersFunctionMinCoins
MinCoins returns the minimum number of coins needed to make the given amount. If the amount cannot be made with the given denominations, return -1.
challenge-22/solution-template.go:31
↓ 4 callersFunctionMinCoins
(amount int, denominations []int)
challenge-22/submissions/tmsankaram/solution-template.go:21
↓ 4 callersFunctionNewAccountError
(err string)
challenge-7/submissions/nzamulov/solution-template.go:28
↓ 4 callersFunctionNewFixedWindowLimiter
NewFixedWindowLimiter creates a new fixed window rate limiter
challenge-29/solution-template.go:190
↓ 4 callersFunctionNewLFUCache
NewLFUCache creates a new LFU cache with the specified capacity
challenge-28/solution-template.go:87
↓ 4 callersFunctionNewLRUCache
NewLRUCache returns a new LRUCache with the given capacity. Returns nil if capacity is less than 1.
challenge-28/submissions/PopovMarko/solution-template.go:78
↓ 4 callersFunctionNewSlidingWindowLimiter
NewSlidingWindowLimiter creates a new sliding window rate limiter
challenge-29/solution-template.go:123
↓ 4 callersFunctionNewThreadSafeCache
NewThreadSafeCache wraps cache with a mutex. Returns nil if cache is nil.
challenge-28/submissions/PopovMarko/solution-template.go:683
↓ 4 callersFunctionOptimizedLIS
OptimizedLIS finds the length of the longest increasing subsequence using an optimized approach with O(n log n) time complexity.
challenge-24/solution-template.go:52
↓ 4 callersMethodPrivateMessage
PrivateMessage sends a message to a specific client
challenge-8/solution-template.go:60
↓ 4 callersMethodPush
Push appends a value to the tail of the queue. The error return is unused but kept to mirror a typical queue interface.
challenge-25/submissions/PopovMarko/solution-template.go:84
↓ 4 callersMethodPut
(key string, value interface{})
challenge-28/solution-template.go:148
↓ 4 callersFunctionRabinKarpSearch
RabinKarpSearch implements the Rabin-Karp algorithm to find pattern in text. Returns a slice of all starting indices where the pattern is found.
challenge-23/solution-template.go:57
↓ 4 callersMethodReceive
Receive returns the next message for the client (blocking)
challenge-8/solution-template.go:22
↓ 4 callersMethodRemoveEmployee
RemoveEmployee removes an employee by ID from the manager's list.
challenge-3/solution-template.go:22
↓ 4 callersMethodRetryFailedTransaction
RetryFailedTransaction retries a failed transaction with exponential backoff
packages/mongodb/challenge-5-transactions-advanced/solution-template.go:225
↓ 4 callersFunctionSaveInventory
()
packages/cobra/challenge-3-subcommands-persistence/submissions/odelbos/solution.go:316
↓ 4 callersFunctionSaveInventory
SaveInventory writes the current global inventory to the JSON file, truncating any previous contents.
packages/cobra/challenge-3-subcommands-persistence/submissions/PopovMarko/solution.go:457
↓ 4 callersFunctionSeedData
SeedData populates the database with initial data
packages/gorm/challenge-3-migrations/solution-template.go:66
↓ 4 callersMethodShowData
()
challenge-13/submissions/imankhodadi/solution-template.go:172
↓ 4 callersMethodSize
()
challenge-28/solution-template.go:112
↓ 4 callersMethodSize
()
challenge-28/solution-template.go:162
↓ 4 callersFunctionSlowSort
SlowSort sorts a slice of integers using a very inefficient algorithm (bubble sort) TODO: Optimize this function to be more efficient
challenge-16/solution-template.go:10
↓ 4 callersFunctionVerifyCodeChallenge
VerifyCodeChallenge verifies a PKCE code challenge
challenge-15/solution-template.go:183
↓ 4 callersMethodWait
(ctx context.Context)
challenge-29/solution-template.go:73
↓ 4 callersFunctionbiggest
(amount int, d []int)
challenge-22/submissions/hasnogaems/solution-template.go:30
↓ 4 callersFunctionbuildSampleGraph
()
challenge-4/solution-template_test.go:33
↓ 4 callersFunctioncreateMockUserContext
Helper function to create a mock user context for testing
challenge-15/solution-template_test.go:661
↓ 4 callersFunctionfindUserByID
findUserByID returns a pointer to the user with the given ID, or nil if no such user exists.
packages/gin/challenge-4-authentication/submissions/PopovMarko/solution.go:275
↓ 4 callersFunctionfindUserByID
(id int)
packages/gin/challenge-4-authentication/submissions/sweet-boby/solution.go:231
↓ 4 callersFunctionfindUserByID
findUserByID returns a pointer to the stored user with the given ID and its index in the slice, or (nil, -1) if no such user exists.
packages/gin/challenge-1-basic-routing/submissions/PopovMarko/solution.go:194
↓ 4 callersFunctionfindUserByID
(id int)
packages/fiber/challenge-4-authentication/submissions/odelbos/solution.go:375
↓ 4 callersFunctionfindUserByUsername
TODO: Implement user lookup functions
packages/gin/challenge-4-authentication/solution-template.go:142
↓ 4 callersMethodget_achievement_level
Determine achievement level based on challenges solved.
scripts/generate_contributor_badges.py:31
↓ 4 callersFunctionhashPassword
TODO: Implement password hashing
packages/gin/challenge-4-authentication/solution-template.go:107
↓ 4 callersMethodisActive
isActive checks if client is still active
challenge-8/submissions/Kosench/solution-template.go:78
↓ 4 callersMethodisConnected
()
challenge-8/submissions/JackDalberg/solution-template.go:25
↓ 4 callersFunctionisFinite
(value float64)
challenge-7/submissions/jrbarbati/solution-template.go:163
↓ 4 callersFunctionisNilShape
Helper function to guard against typed nil Shape
challenge-10/submissions/PopovMarko/solution-template.go:29
↓ 4 callersFunctionisValidSKU
Helper function to test SKU validation
packages/fiber/challenge-3-validation-errors/solution-template_test.go:213
↓ 4 callersFunctionnewErrorResponse
newErrorResponse returns new ErrorResponse struct
challenge-9/submissions/PopovMarko/solution-template.go:543
↓ 4 callersFunctionokResponse
(c fiber.Ctx, status int, token string, user User, msg string)
packages/fiber/challenge-4-authentication/submissions/odelbos/solution.go:398
↓ 4 callersFunctionreadDirectory
readDirectory reads files from directory and returns FileInfo slice
packages/cobra/challenge-2-flags-args/solution-template.go:295
↓ 4 callersMethodremoveCh
removeCh removes a waiter channel from the internal queue.
challenge-29/submissions/PopovMarko/solution-template.go:226
↓ 4 callersMethodremoveLFUNode
removeLFUNode unlinks node from its FreqGroup list, removes it from the cache map, and decrements the cache size. The FreqGroup is deleted when it bec
challenge-28/submissions/PopovMarko/solution-template.go:323
↓ 4 callersFunctionrestore_readme
Restore README.md from backup.
scripts/test_scoreboards.py:107
↓ 4 callersFunctionsearch
(graph map[int][]int, start int)
challenge-4/submissions/ne0phyte/solution-template.go:54
↓ 4 callersMethodsetState
setState changes the circuit breaker state and triggers callbacks
challenge-20/submissions/odelbos/solution-template.go:147
↓ 4 callersMethodsetState
setState changes the circuit breaker state and triggers callbacks
challenge-20/submissions/hudazaan/solution-template.go:144
↓ 4 callersMethodsetState
setState changes the circuit breaker state and triggers callbacks This method does not lock mutex since it expect the parent function to lock the mut
challenge-20/submissions/hvijaycse/solution-template.go:167
↓ 4 callersMethodsetState
setState changes the circuit breaker state and triggers callbacks
challenge-20/submissions/manik23/solution-template.go:170
↓ 4 callersMethodsetState
setState changes the circuit breaker state and triggers callbacks setState changes state and returns (changed, oldState) so the caller can invoke the
challenge-20/submissions/imankhodadi/solution-template.go:255
↓ 4 callersMethodsetState
setState changes the circuit breaker state and triggers callbacks
challenge-20/submissions/amrshaban2005/solution-template.go:186
↓ 4 callersMethodsetState
setState changes the circuit breaker state and triggers callbacks NOTE: Caller MUST hold write lock (mutex.Lock)
challenge-20/submissions/YounesBouchbouk/solution-template.go:142
↓ 4 callersMethodsetState
setState changes the circuit breaker state and triggers callbacks. It expects the caller to hold the mutex.
challenge-20/submissions/anhvu2001ct/solution-template.go:179
↓ 4 callersMethodsetState
setState changes the circuit breaker state and triggers callbacks
challenge-20/submissions/mick4711/solution-template.go:166
↓ 4 callersMethodsetState
setState changes the circuit breaker state and triggers callbacks
challenge-20/submissions/PolinaSvet/solution-template.go:220
↓ 4 callersMethodsetState
setState changes the circuit breaker state and triggers callbacks
challenge-20/submissions/y1hao/solution-template.go:172
↓ 4 callersMethodsetState
setState changes the circuit breaker state and triggers callbacks
challenge-20/submissions/PureTeamLead/solution-template.go:157
↓ 4 callersMethodsetState
setState changes the circuit breaker state and triggers callbacks
challenge-20/submissions/Onkar-25/solution-template.go:145
↓ 4 callersMethodsetState
setState changes the circuit breaker state and triggers callbacks
challenge-20/submissions/nzamulov/solution-template.go:192
↓ 4 callersFunctionsetupRoutes
(e *echo.Echo)
packages/echo/challenge-2-middleware/solution-template.go:118
↓ 4 callersFunctionvalidateProduct
TODO: Implement comprehensive product validation
packages/gin/challenge-3-validation-errors/solution-template.go:119
↓ 4 callersFunctionverifyPassword
TODO: Implement password verification
packages/gin/challenge-4-authentication/solution-template.go:113
↓ 4 callersFunctionworker
(graph map[int][]int, jobs <-chan int, results chan<- BFSResult)
challenge-4/submissions/t4e1/solution-template.go:44
↓ 3 callersMethodAdd
Add adds an element to the set if it's not already present
challenge-27/submissions/JackDalberg/solution-template.go:161
↓ 3 callersMethodAllowN
(n int)
challenge-29/solution-template.go:67
↓ 3 callersMethodAllowN
(n int)
challenge-29/submissions/PolinaSvet/solution-template.go:129
↓ 3 callersMethodArea
()
challenge-10/submissions/wgasparin/solution-template.go:13
↓ 3 callersFunctionBinarySearchRecursive
BinarySearchRecursive performs binary search using recursion. Returns the index of the target if found, or -1 if not found.
challenge-21/solution-template.go:35
↓ 3 callersMethodBroadcast
Broadcast sends a message to all connected clients
challenge-8/submissions/PolinaSvet/solution-template.go:135
↓ 3 callersMethodCapacity
()
challenge-28/solution-template.go:218
↓ 3 callersFunctionCategoryExists
CategoryExists checks if a category exists
packages/cobra/challenge-3-subcommands-persistence/solution-template.go:213
↓ 3 callersFunctionCoinCombination
(amount int, denominations []int)
challenge-22/submissions/imankhodadi/solution-template.go:35
↓ 3 callersFunctionContains
Contains returns true if the slice contains the given element
challenge-27/solution-template.go:210
↓ 3 callersMethodContains
Contains returns true if the set contains the given element
challenge-27/submissions/hvijaycse/solution-template.go:176
↓ 3 callersMethodContains
Contains returns true if the set contains the given element
challenge-27/submissions/y1hao/solution-template.go:166
↓ 3 callersMethodContains
Contains returns true if the set contains the given element
challenge-27/submissions/shansing/solution-template.go:174
↓ 3 callersMethodContains
Contains returns true if the set contains the given element
challenge-27/submissions/KhaledMosaad/solution-template.go:210
← previousnext →301–400 of 12,886, ranked by callers