Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/RezaSi/go-interview-practice
/ functions
Functions
12,886 in github.com/RezaSi/go-interview-practice
⨍
Functions
12,886
◇
Types & classes
2,640
↓ 4 callers
Method
Elements
Elements returns a slice containing all elements in the set
challenge-27/submissions/cep-ter/solution-template.go:184
↓ 4 callers
Method
Elements
Elements returns a slice containing all elements in the set
challenge-27/submissions/ashwinipatankar/solution-template.go:241
↓ 4 callers
Method
Elements
Elements returns a slice containing all elements in the set
challenge-27/submissions/JackDalberg/solution-template.go:181
↓ 4 callers
Function
ExpensiveCalculation
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 callers
Function
FahrenheitToCelsius
FahrenheitToCelsius converts a temperature from Fahrenheit to Celsius Formula: C = (F - 32) × 5/9
challenge-18/solution-template.go:29
↓ 4 callers
Method
GetAll
()
packages/gin/challenge-1-basic-routing/submissions/PolinaSvet/solution.go:44
↓ 4 callers
Method
GetAuditTrail
GetAuditTrail retrieves audit trail for compliance
packages/mongodb/challenge-5-transactions-advanced/solution-template.go:210
↓ 4 callers
Method
GetByID
(id int)
packages/gin/challenge-1-basic-routing/submissions/PolinaSvet/solution.go:45
↓ 4 callers
Method
GetIndexUsageStats
GetIndexUsageStats retrieves index usage statistics for optimization
packages/mongodb/challenge-4-indexing-performance/solution-template.go:203
↓ 4 callers
Function
GetLISElements
GetLISElements returns one possible longest increasing subsequence (not just the length, but the actual elements).
challenge-24/solution-template.go:59
↓ 4 callers
Method
GetPackage
(packageID string)
web-ui/internal/services/package.go:463
↓ 4 callers
Function
GetPostsByCategoryWithUserInfo
GetPostsByCategoryWithUserInfo retrieves posts by category with pagination and user info
packages/gorm/challenge-4-advanced-queries/solution-template.go:59
↓ 4 callers
Method
GetProductPerformance
GetProductPerformance analyzes product performance with customer data
packages/mongodb/challenge-3-aggregation-pipeline/solution-template.go:147
↓ 4 callers
Method
GetSalesByCategory
GetSalesByCategory calculates total sales per category using aggregation
packages/mongodb/challenge-3-aggregation-pipeline/solution-template.go:91
↓ 4 callers
Function
GetUserByID
GetUserByID retrieves a user by ID using generics API
packages/gorm/challenge-5-generics/solution-template.go:58
↓ 4 callers
Method
HandleAuthorize
HandleAuthorize handles the authorization endpoint
challenge-15/solution-template.go:146
↓ 4 callers
Function
InefficientStringBuilder
InefficientStringBuilder builds a string by repeatedly concatenating TODO: Optimize this function to be more efficient
challenge-16/solution-template.go:37
↓ 4 callers
Function
KMPSearch
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 callers
Method
Less
(i, j int)
challenge-10/solution-template_test.go:443
↓ 4 callers
Method
ListIndexes
ListIndexes retrieves all indexes on the collection with detailed information
packages/mongodb/challenge-4-indexing-performance/solution-template.go:109
↓ 4 callers
Method
LoadSponsors
LoadSponsors loads sponsor list by scraping the public GitHub sponsors page
web-ui/internal/handlers/api.go:52
↓ 4 callers
Function
MinCoins
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 callers
Function
MinCoins
(amount int, denominations []int)
challenge-22/submissions/tmsankaram/solution-template.go:21
↓ 4 callers
Function
NewAccountError
(err string)
challenge-7/submissions/nzamulov/solution-template.go:28
↓ 4 callers
Function
NewFixedWindowLimiter
NewFixedWindowLimiter creates a new fixed window rate limiter
challenge-29/solution-template.go:190
↓ 4 callers
Function
NewLFUCache
NewLFUCache creates a new LFU cache with the specified capacity
challenge-28/solution-template.go:87
↓ 4 callers
Function
NewLRUCache
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 callers
Function
NewSlidingWindowLimiter
NewSlidingWindowLimiter creates a new sliding window rate limiter
challenge-29/solution-template.go:123
↓ 4 callers
Function
NewThreadSafeCache
NewThreadSafeCache wraps cache with a mutex. Returns nil if cache is nil.
challenge-28/submissions/PopovMarko/solution-template.go:683
↓ 4 callers
Function
OptimizedLIS
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 callers
Method
PrivateMessage
PrivateMessage sends a message to a specific client
challenge-8/solution-template.go:60
↓ 4 callers
Method
Push
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 callers
Method
Put
(key string, value interface{})
challenge-28/solution-template.go:148
↓ 4 callers
Function
RabinKarpSearch
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 callers
Method
Receive
Receive returns the next message for the client (blocking)
challenge-8/solution-template.go:22
↓ 4 callers
Method
RemoveEmployee
RemoveEmployee removes an employee by ID from the manager's list.
challenge-3/solution-template.go:22
↓ 4 callers
Method
RetryFailedTransaction
RetryFailedTransaction retries a failed transaction with exponential backoff
packages/mongodb/challenge-5-transactions-advanced/solution-template.go:225
↓ 4 callers
Function
SaveInventory
()
packages/cobra/challenge-3-subcommands-persistence/submissions/odelbos/solution.go:316
↓ 4 callers
Function
SaveInventory
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 callers
Function
SeedData
SeedData populates the database with initial data
packages/gorm/challenge-3-migrations/solution-template.go:66
↓ 4 callers
Method
ShowData
()
challenge-13/submissions/imankhodadi/solution-template.go:172
↓ 4 callers
Method
Size
()
challenge-28/solution-template.go:112
↓ 4 callers
Method
Size
()
challenge-28/solution-template.go:162
↓ 4 callers
Function
SlowSort
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 callers
Function
VerifyCodeChallenge
VerifyCodeChallenge verifies a PKCE code challenge
challenge-15/solution-template.go:183
↓ 4 callers
Method
Wait
(ctx context.Context)
challenge-29/solution-template.go:73
↓ 4 callers
Function
biggest
(amount int, d []int)
challenge-22/submissions/hasnogaems/solution-template.go:30
↓ 4 callers
Function
buildSampleGraph
()
challenge-4/solution-template_test.go:33
↓ 4 callers
Function
createMockUserContext
Helper function to create a mock user context for testing
challenge-15/solution-template_test.go:661
↓ 4 callers
Function
findUserByID
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 callers
Function
findUserByID
(id int)
packages/gin/challenge-4-authentication/submissions/sweet-boby/solution.go:231
↓ 4 callers
Function
findUserByID
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 callers
Function
findUserByID
(id int)
packages/fiber/challenge-4-authentication/submissions/odelbos/solution.go:375
↓ 4 callers
Function
findUserByUsername
TODO: Implement user lookup functions
packages/gin/challenge-4-authentication/solution-template.go:142
↓ 4 callers
Method
get_achievement_level
Determine achievement level based on challenges solved.
scripts/generate_contributor_badges.py:31
↓ 4 callers
Function
hashPassword
TODO: Implement password hashing
packages/gin/challenge-4-authentication/solution-template.go:107
↓ 4 callers
Method
isActive
isActive checks if client is still active
challenge-8/submissions/Kosench/solution-template.go:78
↓ 4 callers
Method
isConnected
()
challenge-8/submissions/JackDalberg/solution-template.go:25
↓ 4 callers
Function
isFinite
(value float64)
challenge-7/submissions/jrbarbati/solution-template.go:163
↓ 4 callers
Function
isNilShape
Helper function to guard against typed nil Shape
challenge-10/submissions/PopovMarko/solution-template.go:29
↓ 4 callers
Function
isValidSKU
Helper function to test SKU validation
packages/fiber/challenge-3-validation-errors/solution-template_test.go:213
↓ 4 callers
Function
newErrorResponse
newErrorResponse returns new ErrorResponse struct
challenge-9/submissions/PopovMarko/solution-template.go:543
↓ 4 callers
Function
okResponse
(c fiber.Ctx, status int, token string, user User, msg string)
packages/fiber/challenge-4-authentication/submissions/odelbos/solution.go:398
↓ 4 callers
Function
readDirectory
readDirectory reads files from directory and returns FileInfo slice
packages/cobra/challenge-2-flags-args/solution-template.go:295
↓ 4 callers
Method
removeCh
removeCh removes a waiter channel from the internal queue.
challenge-29/submissions/PopovMarko/solution-template.go:226
↓ 4 callers
Method
removeLFUNode
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 callers
Function
restore_readme
Restore README.md from backup.
scripts/test_scoreboards.py:107
↓ 4 callers
Function
search
(graph map[int][]int, start int)
challenge-4/submissions/ne0phyte/solution-template.go:54
↓ 4 callers
Method
setState
setState changes the circuit breaker state and triggers callbacks
challenge-20/submissions/odelbos/solution-template.go:147
↓ 4 callers
Method
setState
setState changes the circuit breaker state and triggers callbacks
challenge-20/submissions/hudazaan/solution-template.go:144
↓ 4 callers
Method
setState
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 callers
Method
setState
setState changes the circuit breaker state and triggers callbacks
challenge-20/submissions/manik23/solution-template.go:170
↓ 4 callers
Method
setState
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 callers
Method
setState
setState changes the circuit breaker state and triggers callbacks
challenge-20/submissions/amrshaban2005/solution-template.go:186
↓ 4 callers
Method
setState
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 callers
Method
setState
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 callers
Method
setState
setState changes the circuit breaker state and triggers callbacks
challenge-20/submissions/mick4711/solution-template.go:166
↓ 4 callers
Method
setState
setState changes the circuit breaker state and triggers callbacks
challenge-20/submissions/PolinaSvet/solution-template.go:220
↓ 4 callers
Method
setState
setState changes the circuit breaker state and triggers callbacks
challenge-20/submissions/y1hao/solution-template.go:172
↓ 4 callers
Method
setState
setState changes the circuit breaker state and triggers callbacks
challenge-20/submissions/PureTeamLead/solution-template.go:157
↓ 4 callers
Method
setState
setState changes the circuit breaker state and triggers callbacks
challenge-20/submissions/Onkar-25/solution-template.go:145
↓ 4 callers
Method
setState
setState changes the circuit breaker state and triggers callbacks
challenge-20/submissions/nzamulov/solution-template.go:192
↓ 4 callers
Function
setupRoutes
(e *echo.Echo)
packages/echo/challenge-2-middleware/solution-template.go:118
↓ 4 callers
Function
validateProduct
TODO: Implement comprehensive product validation
packages/gin/challenge-3-validation-errors/solution-template.go:119
↓ 4 callers
Function
verifyPassword
TODO: Implement password verification
packages/gin/challenge-4-authentication/solution-template.go:113
↓ 4 callers
Function
worker
(graph map[int][]int, jobs <-chan int, results chan<- BFSResult)
challenge-4/submissions/t4e1/solution-template.go:44
↓ 3 callers
Method
Add
Add adds an element to the set if it's not already present
challenge-27/submissions/JackDalberg/solution-template.go:161
↓ 3 callers
Method
AllowN
(n int)
challenge-29/solution-template.go:67
↓ 3 callers
Method
AllowN
(n int)
challenge-29/submissions/PolinaSvet/solution-template.go:129
↓ 3 callers
Method
Area
()
challenge-10/submissions/wgasparin/solution-template.go:13
↓ 3 callers
Function
BinarySearchRecursive
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 callers
Method
Broadcast
Broadcast sends a message to all connected clients
challenge-8/submissions/PolinaSvet/solution-template.go:135
↓ 3 callers
Method
Capacity
()
challenge-28/solution-template.go:218
↓ 3 callers
Function
CategoryExists
CategoryExists checks if a category exists
packages/cobra/challenge-3-subcommands-persistence/solution-template.go:213
↓ 3 callers
Function
CoinCombination
(amount int, denominations []int)
challenge-22/submissions/imankhodadi/solution-template.go:35
↓ 3 callers
Function
Contains
Contains returns true if the slice contains the given element
challenge-27/solution-template.go:210
↓ 3 callers
Method
Contains
Contains returns true if the set contains the given element
challenge-27/submissions/hvijaycse/solution-template.go:176
↓ 3 callers
Method
Contains
Contains returns true if the set contains the given element
challenge-27/submissions/y1hao/solution-template.go:166
↓ 3 callers
Method
Contains
Contains returns true if the set contains the given element
challenge-27/submissions/shansing/solution-template.go:174
↓ 3 callers
Method
Contains
Contains returns true if the set contains the given element
challenge-27/submissions/KhaledMosaad/solution-template.go:210
← previous
next →
301–400 of 12,886, ranked by callers