Tag: GoLang
In GoLang, the defer keyword is used to ensure that a function call is performed later in a program’s execution, typically for purposes of cleanup. Deferred function calls are …
This post writes a go version of caching layer using redis, wrapps it in a class and provides a usage. Let’s create a Go package that provides a caching …
Given a string s, return true if s is a good string, or false otherwise. A string s is good if all the characters that appear in s have …
Reverse bits of a given 32 bits unsigned integer. Note: Note that in some languages such as Java, there is no unsigned integer type. In this case, both input …
In MATLAB, there is a handy function called reshape which can reshape an m x n matrix into a new one with a different size r x c keeping …