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
↓ 3 callers
Function
DPLongestIncreasingSubsequence
DPLongestIncreasingSubsequence finds the length of the longest increasing subsequence using a standard dynamic programming approach with O(n²) time co
challenge-24/submissions/PolinaSvet/solution-template.go:50
↓ 3 callers
Method
Delete
(key string)
challenge-28/solution-template.go:53
↓ 3 callers
Method
Delete
(key string)
challenge-28/solution-template.go:204
↓ 3 callers
Function
DeleteUser
DeleteUser removes a user from the database
packages/gorm/challenge-1-crud-operations/solution-template.go:50
↓ 3 callers
Method
Dequeue
Dequeue removes and returns the front element from the queue Returns an error if the queue is empty
challenge-27/solution-template.go:100
↓ 3 callers
Method
Error
()
challenge-12/submissions/odelbos/solution-template.go:59
↓ 3 callers
Method
ExecuteWithContext
ExecuteWithContext executes a context-aware task that can be cancelled. The task function must respect context cancellation by checking ctx.Done(). If
challenge-30/submissions/imankhodadi/solution-template.go:69
↓ 3 callers
Function
FindInsertPosition
FindInsertPosition returns the index where the target should be inserted to maintain the sorted order of the array.
challenge-21/solution-template.go:42
↓ 3 callers
Function
FindProductByID
FindProductByID finds a product by its ID
packages/cobra/challenge-3-subcommands-persistence/solution-template.go:206
↓ 3 callers
Function
FindProductByID
(id int)
packages/cobra/challenge-3-subcommands-persistence/submissions/odelbos/solution.go:324
↓ 3 callers
Function
FindProductByID
FindProductByID returns a pointer to the product with the given ID and its index in the slice, or nil and -1 when no product matches.
packages/cobra/challenge-3-subcommands-persistence/submissions/PopovMarko/solution.go:472
↓ 3 callers
Function
FindProductByID
FindProductByID finds a product by its ID
packages/cobra/challenge-3-subcommands-persistence/submissions/PolinaSvet/solution.go:418
↓ 3 callers
Function
FindProductByID
FindProductByID finds a product by its ID
packages/cobra/challenge-3-subcommands-persistence/submissions/ashwinipatankar/solution.go:571
↓ 3 callers
Function
GenerateRandomString
GenerateRandomString generates a random string of the specified length
challenge-15/submissions/PopovMarko/solution-template.go:208
↓ 3 callers
Function
GenerateRandomString
GenerateRandomString returns a URL‑safe random string of exact length using crypto/rand.
challenge-15/submissions/nzamulov/solution-template.go:135
↓ 3 callers
Method
Get
(key string)
challenge-28/solution-template.go:193
↓ 3 callers
Method
GetAverageSalary
GetAverageSalary calculates the average salary of all employees.
challenge-3/solution-template.go:27
↓ 3 callers
Method
GetMetrics
()
challenge-29/solution-template.go:107
↓ 3 callers
Function
GetNestedValue
GetNestedValue retrieves value from nested configuration key
packages/cobra/challenge-4-advanced-features/submissions/PolinaSvet/solution.go:584
↓ 3 callers
Method
GetPackageChallenge
(packageID, challengeID string)
web-ui/internal/services/package.go:504
↓ 3 callers
Method
GetPackageChallenges
(packageID string)
web-ui/internal/services/package.go:484
↓ 3 callers
Method
GetPackages
()
web-ui/internal/services/package.go:58
↓ 3 callers
Method
GetProduct
GetProduct retrieves a product by ID
challenge-14/submissions/shivamarora1/solution-template.go:109
↓ 3 callers
Method
GetProduct
GetProduct retrieves a product by ID
challenge-14/submissions/mick4711/solution-template.go:108
↓ 3 callers
Method
GetProduct
GetProduct retrieves a product by ID
challenge-14/submissions/PolinaSvet/solution-template.go:108
↓ 3 callers
Method
GetProduct
GetProduct retrieves a product by ID
challenge-14/submissions/y1hao/solution-template.go:109
↓ 3 callers
Method
GetProduct
GetProduct retrieves a product by ID
challenge-14/submissions/Cpoing/solution-template.go:109
↓ 3 callers
Method
GetProduct
GetProduct retrieves a product by ID
challenge-14/submissions/JackDalberg/solution-template.go:109
↓ 3 callers
Method
GetProduct
GetProduct retrieves a product by ID
challenge-13/submissions/mick4711/solution-template.go:75
↓ 3 callers
Method
GetState
GetState returns the current state of the circuit breaker
challenge-20/submissions/Kosench/solution-template.go:140
↓ 3 callers
Method
IsEmpty
IsEmpty returns true if the queue contains no elements
challenge-27/submissions/PolinaSvet/solution-template.go:191
↓ 3 callers
Function
IsPalindrome
IsPalindrome checks if a string is a palindrome. A palindrome reads the same backward as forward, ignoring case, spaces, and punctuation.
challenge-17/solution-template.go:24
↓ 3 callers
Method
ListUsers
ListUsers retrieves all users from the database
packages/mongodb/challenge-1-connection-crud/solution-template.go:107
↓ 3 callers
Function
Map
Map applies a function to each element in a slice and returns a new slice with the results
challenge-27/solution-template.go:198
↓ 3 callers
Function
MinCoins
(amount int, denominations []int)
challenge-22/submissions/imankhodadi/solution-template.go:8
↓ 3 callers
Function
MinCoinsDP
(amount int, denominations []int)
challenge-22/submissions/imankhodadi/solution-template.go:60
↓ 3 callers
Function
NewCache
Cache Factory Functions NewCache creates a cache with the specified policy and capacity
challenge-28/solution-template.go:233
↓ 3 callers
Function
NewContentAggregator
NewContentAggregator creates a new ContentAggregator with the specified configuration
challenge-11/solution-template.go:36
↓ 3 callers
Function
NewContextManager
NewContextManager creates a new context manager
challenge-30/submissions/jrbarbati/solution-template.go:34
↓ 3 callers
Function
NewFIFOCache
NewFIFOCache creates a new FIFO cache with the specified capacity
challenge-28/solution-template.go:137
↓ 3 callers
Function
NewFileReader
NewFileReader creates a new file reader
challenge-12/solution-template.go:125
↓ 3 callers
Function
NewMockFetcher
()
challenge-11/solution-template_test.go:21
↓ 3 callers
Function
NewMockProcessor
()
challenge-11/solution-template_test.go:62
↓ 3 callers
Function
NewProductServiceServer
NewProductServiceServer creates a new ProductServiceServer
challenge-14/submissions/czysiaczek/solution-template.go:99
↓ 3 callers
Function
NewProductServiceServer
NewProductServiceServer creates a new ProductServiceServer
challenge-14/submissions/longbui98/solution-template.go:99
↓ 3 callers
Function
NewSchemaValidator
NewSchemaValidator creates a new schema validator
challenge-12/submissions/PolinaSvet/solution-template.go:164
↓ 3 callers
Function
NewShapeCalculator
NewShapeCalculator creates a new ShapeCalculator
challenge-10/solution-template.go:110
↓ 3 callers
Function
NewThreadSafeCache
NewThreadSafeCache wraps any cache implementation to make it thread-safe
challenge-28/solution-template.go:188
↓ 3 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/submissions/PolinaSvet/solution-template.go:80
↓ 3 callers
Function
OptimizedSearch
OptimizedSearch is your optimized version of HighAllocationSearch It should produce identical results but perform better with fewer allocations
challenge-16/solution-template.go:117
↓ 3 callers
Method
Pop
Pop removes and returns the top element from the stack Returns an error if the stack is empty
challenge-27/solution-template.go:52
↓ 3 callers
Method
Put
(key string, value interface{})
challenge-28/solution-template.go:199
↓ 3 callers
Method
Put
(key string, value interface{})
challenge-28/submissions/imankhodadi/solution-template.go:289
↓ 3 callers
Method
Read
Read reads data from a file
challenge-12/solution-template.go:131
↓ 3 callers
Function
Reduce
Reduce reduces a slice to a single value by applying a function to each element
challenge-27/solution-template.go:204
↓ 3 callers
Function
RemoveDuplicates
RemoveDuplicates returns a new slice with duplicate elements removed, preserving order
challenge-27/solution-template.go:222
↓ 3 callers
Method
RetrieveDocument
RetrieveDocument retrieves documents from GridFS
packages/mongodb/challenge-5-transactions-advanced/solution-template.go:196
↓ 3 callers
Method
RevokeToken
RevokeToken revokes an access or refresh token
challenge-15/solution-template.go:177
↓ 3 callers
Function
RollbackMigration
RollbackMigration rolls back to a specific migration version
packages/gorm/challenge-3-migrations/solution-template.go:54
↓ 3 callers
Function
SaveConfig
()
packages/cobra/challenge-4-advanced-features/submissions/odelbos/solution.go:369
↓ 3 callers
Function
SetNestedValue
SetNestedValue sets value for nested configuration key
packages/cobra/challenge-4-advanced-features/solution-template.go:292
↓ 3 callers
Method
Size
Size returns the number of elements in the stack
challenge-27/submissions/kiramux/solution-template.go:84
↓ 3 callers
Method
Size
Size returns the number of elements in the stack
challenge-27/submissions/PolinaSvet/solution-template.go:86
↓ 3 callers
Method
StartChangeStream
StartChangeStream starts monitoring account changes in real-time
packages/mongodb/challenge-5-transactions-advanced/solution-template.go:170
↓ 3 callers
Function
UpdateUser
UpdateUser updates an existing user's information
packages/gorm/challenge-1-crud-operations/solution-template.go:44
↓ 3 callers
Function
ValidateConfiguration
ValidateConfiguration runs validation pipeline
packages/cobra/challenge-4-advanced-features/solution-template.go:300
↓ 3 callers
Method
ValidateToken
ValidateToken validates an access token
challenge-15/solution-template.go:165
↓ 3 callers
Method
ValidateUser
(ctx context.Context, userID int64)
challenge-14/solution-template.go:341
↓ 3 callers
Method
WriteHeader
(code int)
packages/gin/challenge-2-middleware/submissions/22-7-co/solution.go:378
↓ 3 callers
Method
addLFUNode
addLFUNode prepends node to the head of its FreqGroup, creating the group if needed. It also registers the node in the cache map and increments the ca
challenge-28/submissions/PopovMarko/solution-template.go:374
↓ 3 callers
Function
authMiddleware
Middleware: JWT Authentication
packages/gin/challenge-4-authentication/submissions/imankhodadi/solution.go:557
↓ 3 callers
Function
authMiddleware
Middleware: JWT Authentication
packages/gin/challenge-4-authentication/submissions/Mxn-ptr/solution.go:464
↓ 3 callers
Function
cleanupTestFiles
()
packages/cobra/challenge-4-advanced-features/solution-template_test.go:22
↓ 3 callers
Method
do
(ctx context.Context, operation func() (any, error))
challenge-20/submissions/y1hao/solution-template.go:149
↓ 3 callers
Function
execute
(operation func() (any, error), cb *circuitBreakerImpl)
challenge-20/submissions/mick4711/solution-template.go:141
↓ 3 callers
Function
findArticleByID
Helper functions findArticleByID finds an article by ID (Done)
packages/gin/challenge-2-middleware/submissions/BrianHuang813/solution.go:477
↓ 3 callers
Function
findArticleByID
---------------------------------------------------------------- Helpers ---------------------------------------------------------------- findArticleB
packages/gin/challenge-2-middleware/submissions/odelbos/solution.go:332
↓ 3 callers
Function
findArticleByID
(id int)
packages/gin/challenge-2-middleware/submissions/imankhodadi/solution.go:397
↓ 3 callers
Function
findArticleByID
findArticleByID finds an article by ID
packages/gin/challenge-2-middleware/submissions/yogtanko/solution.go:554
↓ 3 callers
Function
findArticleByID
Helper functions findArticleByID finds an article by ID
packages/gin/challenge-2-middleware/submissions/4mzy/solution.go:456
↓ 3 callers
Function
findArticleByID
Helper functions findArticleByID finds an article by ID
packages/gin/challenge-2-middleware/submissions/Mxn-ptr/solution.go:603
↓ 3 callers
Function
findArticleByID
============================================================================ 辅助函数 ====================================================================
packages/gin/challenge-2-middleware/submissions/22-7-co/solution.go:696
↓ 3 callers
Function
findArticleByID
Helper functions findArticleByID finds an article by ID
packages/gin/challenge-2-middleware/submissions/Kinsue/solution.go:570
↓ 3 callers
Function
findArticleByID
Helper functions findArticleByID finds an article by ID
packages/gin/challenge-2-middleware/submissions/shansing/solution.go:469
↓ 3 callers
Function
findArticleByID
Helper functions findArticleByID finds an article by ID
packages/gin/challenge-2-middleware/submissions/ItalloMangueBoy/solution.go:526
↓ 3 callers
Function
findArticleByID
Helper functions findArticleByID finds an article by ID
packages/gin/challenge-2-middleware/submissions/Onkar-25/solution.go:557
↓ 3 callers
Function
findArticleByID
Helper functions findArticleByID finds an article by ID
packages/gin/challenge-2-middleware/submissions/father-frog/solution.go:601
↓ 3 callers
Function
findUserByEmail
(email string)
packages/gin/challenge-4-authentication/solution-template.go:147
↓ 3 callers
Function
findUserByEmail
(email string)
packages/gin/challenge-4-authentication/submissions/law-lee/solution.go:212
↓ 3 callers
Function
findUserByID
(id int)
packages/gin/challenge-4-authentication/submissions/BrianHuang813/solution.go:237
↓ 3 callers
Function
findUserByID
(id int)
packages/gin/challenge-4-authentication/submissions/22-7-co/solution.go:225
↓ 3 callers
Function
findUserByID
Helper function to find user by ID (Done)
packages/gin/challenge-1-basic-routing/submissions/BrianHuang813/solution.go:251
↓ 3 callers
Function
findUserByID
Helper function to find user by ID
packages/gin/challenge-1-basic-routing/submissions/0xMoonrise/solution.go:274
↓ 3 callers
Function
findUserByID
--------------------------------------------------------------- Helpers ---------------------------------------------------------------
packages/gin/challenge-1-basic-routing/submissions/odelbos/solution.go:199
↓ 3 callers
Function
findUserByID
Helper function to find user by ID
packages/gin/challenge-1-basic-routing/submissions/labib99/solution.go:263
↓ 3 callers
Function
findUserByID
(id int)
packages/gin/challenge-1-basic-routing/submissions/hudazaan/solution.go:222
↓ 3 callers
Function
findUserByID
Helper function to find user by ID
packages/gin/challenge-1-basic-routing/submissions/mahmoud-shabban/solution.go:307
↓ 3 callers
Function
findUserByID
Helper function to find user by ID
packages/gin/challenge-1-basic-routing/submissions/kelvin-yong/solution.go:192
↓ 3 callers
Function
findUserByID
Helper function to find user by ID
packages/gin/challenge-1-basic-routing/submissions/Alibiderci/solution.go:386
↓ 3 callers
Function
findUserByID
(id int)
packages/gin/challenge-1-basic-routing/submissions/MarioPaez/solution.go:212
← previous
next →
401–500 of 12,886, ranked by callers