Golang UTF 8 Encoding

Golang UTF 8 Encoding Golang UTF 8 EncodingDoes golang used utf-8 encoding ?Key PointsExample Code-1OutputExample Code-2Breakdown of the UTF-8 encoding processLow Level DetailsMindblowing ! But why they made it so…

Product of Array Except Self

Problem StatementGolang CodeBetter versionOptimised versionExplanation of the Provided FunctionComplexityComparison with the First ApproachConclusion LeetCode#238 Problem Statement Given an integer array nums, return an array answer such that answer[i] is equal to the product of all the…

GOLANG SLICE

A slice is a data structure describing a contiguous section of an array stored separately from the slice variable itself.  A slice is not an array. A slice describes a piece of…

Reverse words in string

Problem StatmentExample 1Example 2Example 3ConstraintsGolang SolutionOptimised Version Problem Statment Leetcode #151 Given an input string s, reverse the order of the words. A word is defined as a sequence of non-space characters. The words in s will be…

Golang Channel

Golang ChannelSend & Receive Golang ChannelBuffered ChannelsUse CasesAdvantagesExampleUnbuffered ChannelUse CasesAdvantagesExampleWhen to Use EachReal-World ScenariosConclusionVarious CasesSuccess -1Single item processed using channelError-1all goroutines are asleep - deadlock!Solution-1.1Solution-1.2Channel RangeChannel Select Why Close is…

Golang For Loop

ArraysStringsMapChannelsNotes Arrays When you use range with an array or a slice, it iterates over the indices and values of the elements. package main import "fmt" func main() { intArr…

Strings

Slice vs ArrayArraySliceGolang Strings Copy1. Using String Slicing2. Using a Loop with String Concatenation3. Using fmt.Sprintf4. Using strings.Builder5. Using copy with Byte Slices6. Using append with Byte Slices7. Using strings.Clone…

Golang Top 10 Features

Golang Top 10 Features1. Tuple Assignment in Go2. Multiple Return Values3. Named Return Values4. Defer Statement5. Go Routines, Anonymous Functions and ClosuresAnonymous FunctionClosureVariadic FunctionsAdvanced Example: Logging Function6. Channels7. Select Statement8.…