Overview There is a group of sentences given. Find the maximum number of words that appear in a sentence within that group of sentences Example Program Here is the program for the…
Tag: go
Program for the total number of words in a sentence in Go (Golang)
Overview Given a sentence find number of words in it. Each word in the sentence only has English letters Example Program Here is the program for the same. Output Note: Check out…
The nth digit in a sequence program in Go (Golang)
Overview Given an integer n find the nth digit in the infinite sequence {1, 2, 3, 4 ….. infinity} Example The 14th digit of the sequence 1, 2, 3, 4, 5, 6,…
Find all Arithmetic series of length greater than two in Go (Golang)
Overview An Arithmetic series is a series in which the difference between each element is equal. In this program, an array of integers is given. The objective is to find all arithmetic…
Find All Duplicates in an Array in Go (Golang)
Overview An array is given in which all elements are in the range [1, n] where n is the length of the array. The objective is to find all duplicates in that…
Set matrix zero if a row or column is zero in Go (Golang)
Overview An m*n matrix is given. If an element is zero then set its row and column to zero Examples Input: Output: We will solve it by taking two additional arrays rowSet…
Program to multiply two strings in Go (Golang)
Overview Write a program to multiply two strings. Examples Program Here is the program for the same. Output Note: Check out our Golang Advanced Tutorial. The tutorials in this series are elaborative…
Search Insert Position Program in Go (Golang)
Overview A sorted input array having distinct integers and a target value are given. The objective is to find the insert position for that target value in that array. There are two…
Minimum Path Sum Program in Go (Golang)
Overview There is an m*n matrix that contains non-negative integers. The objective is to find a minimum sum path moving from Top-Left to Bottom-Right. You can only move right or down. For…
Program for the same binary tree in Go (Golang)
Overview The objective is to find if two given binary trees are the same or notExampleBelow trees are the same Tree 1 Tree 2 Program Here is the program for the same….