Welcome To Golang By Example

Menu
  • Home
  • Blog
Menu

Tag: go

Check if a string contains single or multiple whitespaces in Go (Golang)

Posted on February 10, 2023February 10, 2023 by admin

Overview A simple regex can be used to check if a string contains single or multiple white spaces in Go. Here is the program for the same Program Output Note: Check out…

Sort a slice of Int in Ascending and Descending order in Go (Golang)

Posted on October 13, 2023October 13, 2023 by admin

Sort a slice in Ascending order sort.Ints package of going can be used to sort a full slice or a part of the slice. It is going to sort the string into…

Repeat a string multiple times in Go (Golang)

Posted on October 9, 2023October 9, 2023 by admin

Overview strings.Repeat method can be used to repeat a string multiple times in Go (Golang) Here is the link to this function in the Go strings package https://pkg.go.dev/strings#Repeat Here is the signature…

Print the next or previous character given a char in Go (Golang)

Posted on October 9, 2023October 9, 2023 by admin

Overview Simply by doing plus 1 and minus 1 we can get the next and previous character given a current char. Program Here is the program for the same Output: Note: Check…

Program for Longest Word in Dictionary through Deleting in Go (Golang)

Posted on September 30, 2023September 30, 2023 by admin

Overview A string and a dictionary of words are given. The objective is to find the longest word in the dictionarywhich is present as a subsequence in the given string. If the…

Remove Linked List Elements Program in Go (Golang)

Posted on September 15, 2023September 15, 2023 by admin

Overview Given a linked list and a value, delete all nodes from the linked list whose value is equal to the given value. Example 1 Example 2 Program Below is the program…

Count unguarded cells program in Go (Golang)

Posted on August 25, 2023August 25, 2023 by admin

Overview Two integers m and n are given which represent an m*n grid. Other than that two 2D integer arrays are also given guards where guards[i] = [rowi , columni]. It represents…

Recover Binary Search Tree Program in Go (Golang)

Posted on August 19, 2023August 19, 2023 by admin

Overview The root of a binary search tree is given. Two nodes of the binary search tree have been swapped. We need to fix the binary tree and recover the original structure…

Program for ugly number 2 in Go (Golang)

Posted on August 13, 2023August 13, 2023 by admin

Overview An ugly number is a number whose prime factors are limited to 2,3 and 5. We have already seen a program where given a number n returns true if it is…

Is Graph Bipartite Program in Go (Golang)

Posted on August 1, 2023August 1, 2023 by admin

Overview An undirected graph is given. A graph is said to be bipartite if the nodes of the graph can be partitioned into two subsets such that every edge connects one node…

Posts pagination

1 2 … 44 Next

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: Web XP