Welcome To Golang By Example

Menu
  • Home
  • Blog
  • Contact Us
  • Support this website
Menu

Tag: go

Generate valid parentheses in Go (Golang)

Posted on August 20, 2021August 20, 2021 by admin

Overview Given an int n which means the number of pairs of parentheses, generate all valid well-formed parenthesis. For eg ProgramIdea is to use two integers open – It represents the number…

Find the sum which is closest to a target number using three numbers in an array or 3Sum closest problem in Go (Golang)

Posted on August 20, 2021August 20, 2021 by admin

Overview The objective is to find the sum using three triplets in the given array such that the sum is closest to a given target sum. For Program Below is the program…

Find all triplets in an array that adds to a target number in Go (Golang)

Posted on August 18, 2021August 18, 2021 by admin

Overview Let’s say the input is Then the answer would be We can use a hash for the solution. It is based upon the idea that If two of the numbers are…

Find all triplets in an array that adds to a zero in Go (Golang)

Posted on August 18, 2021August 18, 2021 by admin

Overview Let’s say the input is Then the answer would be We can use a hash for the solution. It is based upon the idea that If two of the numbers are…

Implement your own Atoi function in Go (Golang)

Posted on August 18, 2021August 18, 2021 by admin

Overview Atoi function converts a given string into its number representation.  For eg Program Below is the program for the same. Output

Reverse a number or an integer in Go (Golang)

Posted on August 18, 2021August 18, 2021 by admin

Overview The objective is to reverse a number that is an integer. Integer can be negative as well. Some examples Here is the strategy First, make the input number positive Use the…

Medium of two sorted arrays in Go (Golang)

Posted on August 17, 2021August 17, 2021 by admin

Overview The objective is to return the medium of two sorted arrays. For example, if the input is Then the median is 4 because if we sort both arrays then 4 is…

Add two numbers represented by linked list in Go (Golang)

Posted on August 15, 2021August 15, 2021 by admin

Overview Assume that both the linked list is already reversed. Meaning that let’s say the numbers are 478 339 The output should be 817 Assume both numbers are represented as a linked…

Find two numbers in an array that adds up to a target number in Go (Golang)

Posted on August 15, 2021August 15, 2021 by admin

Overview For example, let’s say we have a given array The target number is 4 Then the answer will be index as we have Number 1 at index 2 Number 3 at…

Print/Output text in underline in Go (Golang)

Posted on August 14, 2021August 14, 2021 by admin

Overview We can use the faith package to achieve the same https://github.com/fatih/color Program Output Note: Check out our Golang Advanced Tutorial. The tutorials in this series are elaborative and we have tried…

Posts pagination

Previous 1 … 10 11 12 … 44 Next
Follow @golangbyexample

Popular Articles

Golang Comprehensive Tutorial Series

All Design Patterns in Go (Golang)

Slice in golang

Variables in Go (Golang) – Complete Guide

OOP: Inheritance in GOLANG complete guide

Using Context Package in GO (Golang) – Complete Guide

All data types in Golang with examples

Understanding time and date in Go (Golang) – Complete Guide

©2025 Welcome To Golang By Example | Design: Newspaperly WordPress Theme