Welcome To Golang By Example

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

Category: Tech

Count unreachable pair of nodes in an undirected graph in Go (Golang)

Posted on July 15, 2022July 15, 2022 by admin

Overview An integer n is given. There are n  nodes numbered 0 to n-1.  A 2D integer array edges is also given where edges[i] = [ai, bi] means that there is an…

Find the number which appears once in an array in Go(Golang)

Posted on July 14, 2022July 14, 2022 by admin

Overview An array is given in which every element is present twice except one element. The objective is to find that element in constant extra space Example 1 Example 2 The idea…

Majority element in an array in Go (Golang)

Posted on June 6, 2022June 6, 2022 by admin

Overview The objective is to find the majority element in a given array. A majority element is an element that occurs more than n/2 times in a given array where n is…

Program for Binary Search in a sorted array in Go (Golang)

Posted on May 28, 2022May 28, 2022 by admin

Overview Idea is to do a binary search of a given target element in an input array. If the target element is present then output the index. If the output element is…

Longest Common Prefix in a set of strings in Go (Golang)

Posted on April 26, 2022April 26, 2022 by admin

Overview An array of strings is given. The objective is to find the longest common prefix from that array of strings.  It should output an empty string if there is no common…

What does chmod o-w command mean in bash or terminal

Posted on April 3, 2022April 3, 2022 by admin

Overview There are three components that are in the picture when it comes to managing the permissions of a file.  Permission Groups User – Abbreviated by ‘u’ Group – Abbreviated by ‘g’…

Maximum Length of Contiguous Subarray with an equal number of 0’s and 1’s in Go (Golang)

Posted on March 27, 2022March 27, 2022 by admin

Overview An array is given that only has 0’s and 1’s. The objective is to find a maximum length subarray with an equal number of 0’s and 1’s. Let’s understand it with…

Maximum Difference between increasing elements in an array in Go (Golang)

Posted on March 27, 2022March 27, 2022 by admin

Overview An array is given. The objective is to find the maximum difference between values at two indexes i and j such that j > i arr[j] > arr[i] If no such…

Two furthest houses with different colors in Go (Golang)

Posted on March 27, 2022March 27, 2022 by admin

Overview An array is given which represents the color of houses. So array[i] represents the color of the house at index i. The objective is to find two furthest houses with different…

Non-Overlapping intervals program in Go (Golang)

Posted on March 14, 2022March 14, 2022 by admin

Overview An array of intervals is given where intervals[i] = [starti, endi]. We have to find out the minimum number of intervals to remove so that the interval in the intervals array…

Posts pagination

Previous 1 … 3 4 5 … 62 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